home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / ptolemy / patch_04.lha / PATCH-0.4.1 / patch_pt-0.4.1 < prev    next >
Text File  |  1993-07-26  |  110KB  |  3,673 lines

  1. *** ./config-hppa.mk    Mon Apr 19 04:05:04 1993
  2. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/config-hppa.mk    Wed Apr 14 13:40:24 1993
  3. ***************
  4. *** 0 ****
  5. --- 1,41 ----
  6. + # Configuration makefile to make on an HP-PA machine (7xx or 8xx)
  7. + # running HP-UX with g++2.3.3.u1 or later.  The debug format is the
  8. + # one invented by Utah (HP's format is proprietary) so you will need
  9. + # gdb to debug.
  10. + #
  11. + # @(#)config-hppa.mk    1.4    4/13/93
  12. + # Copyright (c) 1993 The Regents of the University of California.
  13. + #                       All Rights Reserved.
  14. + #               
  15. + # Programmer:  J. T. Buck
  16. + # Get the g++ definitions; we override some below.
  17. + include $(ROOT)/config-g++.mk
  18. + GPPFLAGS=-DUSG -g $(MEMLOG)
  19. + # Use gcc
  20. + CC=gcc
  21. + CFLAGS=-DUSG -g
  22. + # The following is temporary until the problem with LINK_LIBGCC_SPECIAL
  23. + # is cleared up -- must pass dir with libg++.a to linker
  24. + GNULIBDIR=/home/gnu/lib
  25. + LINKFLAGS=-L$(LIBDIR) -L$(GNULIBDIR)
  26. + # If the X11 include directories are in /usr/include/X11, leave
  27. + # the following symbol blank.  Otherwise define it as "-Idir" where
  28. + # dir is the PARENT of the include directory, which must end in X11.
  29. + # (this value says to use the headers we stick in with the distribution).
  30. + X11INCL = -I$(ROOT)/src/compat
  31. + # If the X11 libraries are not on the standard library search path,
  32. + # define the following symbol as "-Ldir" where dir is the directory
  33. + # containing them.  Otherwise leave it blank.
  34. + # (you may need to change this)
  35. + X11LIBDIR = -L/usr/lib/X11R5
  36. + # Tcl symbols
  37. + TCL_ROOT = $(ROOT)/tcl
  38. + TCL_H_DIR = $(TCL_ROOT)/include
  39. + TCL_LIBDIR = $(TCL_ROOT)/lib.$(ARCH)
  40. *** ./src/kernel/Display.cc    Mon Dec  7 16:42:44 1992
  41. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/kernel/Display.cc    Mon Apr 12 17:49:45 1993
  42. ***************
  43. *** 1,7 ****
  44.   static const char file_id[] = "Display.cc";
  45.   /**************************************************************************
  46.   Version identification:
  47. ! @(#)Display.cc    1.24 12/7/92
  48.   
  49.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  50.   All rights reserved.
  51. --- 1,7 ----
  52.   static const char file_id[] = "Display.cc";
  53.   /**************************************************************************
  54.   Version identification:
  55. ! @(#)Display.cc    1.25 4/10/93
  56.   
  57.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  58.   All rights reserved.
  59. ***************
  60. *** 71,76 ****
  61. --- 71,77 ----
  62.   #include <math.h>
  63.   #include "streamCompat.h"
  64.   #include "paths.h"
  65. + #include "SimControl.h"
  66.   
  67.   // constructor initializes streams and filenames
  68.   XGraph :: XGraph () : strm(0), tmpFileNames(0), count(0), blockIamIn(0), ng(0)
  69. ***************
  70. *** 201,206 ****
  71. --- 202,208 ----
  72.       count[didx]++;
  73.       fcheck(x,dataSet);
  74.       fcheck(y,dataSet);
  75. +     if (SimControl::haltRequested()) return;
  76.       if (count[didx] >= nIgnore && strm[didx]) {
  77.           if (ascii) {
  78.           fprintf(strm[didx], "%g %g\n", x, y);
  79. *** ./src/kernel/EventHorizon.h    Mon Dec  7 15:21:04 1992
  80. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/kernel/EventHorizon.h    Mon Apr 12 17:49:45 1993
  81. ***************
  82. *** 16,22 ****
  83.   
  84.   /**************************************************************************
  85.   Version identification:
  86. ! @(#)EventHorizon.h    2.14    12/7/92
  87.   
  88.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  89.   All rights reserved.
  90. --- 16,22 ----
  91.   
  92.   /**************************************************************************
  93.   Version identification:
  94. ! @(#)EventHorizon.h    2.15    2/20/93
  95.   
  96.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  97.   All rights reserved.
  98. ***************
  99. *** 75,81 ****
  100.       // SDFfromUniversal: public FromUniversal, public OutSDFPort
  101.       // SDFToUniversal::SDFToUniversal() : ToEventHorizon(this) {...}
  102.   
  103. !     EventHorizon(PortHole* self): selfPort(self) {}
  104.   
  105.       // virtual destructor
  106.       virtual ~EventHorizon();
  107. --- 75,82 ----
  108.       // SDFfromUniversal: public FromUniversal, public OutSDFPort
  109.       // SDFToUniversal::SDFToUniversal() : ToEventHorizon(this) {...}
  110.   
  111. !     EventHorizon(PortHole* self): selfPort(self), ghostPort(0), wormhole(0)
  112. !          {}
  113.   
  114.       // virtual destructor
  115.       virtual ~EventHorizon();
  116. *** ./src/kernel/Geodesic.h    Wed Nov 25 20:43:37 1992
  117. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/kernel/Geodesic.h    Mon Apr 12 17:49:46 1993
  118. ***************
  119. *** 7,13 ****
  120.   
  121.   /****************************************************************
  122.   Version identification:
  123. ! @(#)Geodesic.h    2.11    11/25/92
  124.   
  125.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  126.   All rights reserved.
  127. --- 7,13 ----
  128.   
  129.   /****************************************************************
  130.   Version identification:
  131. ! @(#)Geodesic.h    2.12    4/10/93
  132.   
  133.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  134.   All rights reserved.
  135. ***************
  136. *** 118,123 ****
  137. --- 118,127 ----
  138.   
  139.       // return the number of initial particles
  140.       int numInit() const {return numInitialParticles;}
  141. +     // access head and tail of queue
  142. +     Particle* head() const { return pstack.head();}
  143. +     Particle* tail() const { return pstack.tail();}
  144.   
  145.       // Information printing
  146.       StringList print(int verbose = 0) const;
  147. *** ./src/kernel/Histogram.cc    Wed Nov 25 20:39:00 1992
  148. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/kernel/Histogram.cc    Mon Apr 12 17:49:46 1993
  149. ***************
  150. *** 1,7 ****
  151.   static const char file_id[] = "Histogram.cc";
  152.   /**************************************************************************
  153.   Version identification:
  154. ! @(#)Histogram.cc    2.8    11/25/92
  155.   
  156.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  157.   All rights reserved.
  158. --- 1,7 ----
  159.   static const char file_id[] = "Histogram.cc";
  160.   /**************************************************************************
  161.   Version identification:
  162. ! @(#)Histogram.cc    2.9    2/20/93
  163.   
  164.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  165.   All rights reserved.
  166. ***************
  167. *** 127,140 ****
  168.   }
  169.   
  170.   void XHistogram :: terminate() {
  171. !     int count;
  172. !     double binCtr;
  173. !     int binno = 0;
  174. !     while (hist->getData (binno, count, binCtr)) {
  175. !         display->addPoint (binCtr, float(count));
  176. !         binno++;
  177.       }
  178. -     display->terminate();
  179.       LOG_DEL; delete hist;
  180.       hist = 0;
  181.       LOG_DEL; delete [] optstring;
  182. --- 127,142 ----
  183.   }
  184.   
  185.   void XHistogram :: terminate() {
  186. !     if (numCounts() > 0) {
  187. !         int count;
  188. !         double binCtr;
  189. !         int binno = 0;
  190. !         while (hist->getData (binno, count, binCtr)) {
  191. !             display->addPoint (binCtr, float(count));
  192. !             binno++;
  193. !         }
  194. !         display->terminate();
  195.       }
  196.       LOG_DEL; delete hist;
  197.       hist = 0;
  198.       LOG_DEL; delete [] optstring;
  199. *** ./src/kernel/Linker.cc    Mon Dec  7 16:42:48 1992
  200. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/kernel/Linker.cc    Wed Apr 14 15:28:49 1993
  201. ***************
  202. *** 1,7 ****
  203.   static const char file_id[] = "Linker.cc";
  204.   /**************************************************************************
  205.   Version identification:
  206. ! @(#)Linker.cc    2.25    12/7/92
  207.   
  208.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  209.   All rights reserved.
  210. --- 1,7 ----
  211.   static const char file_id[] = "Linker.cc";
  212.   /**************************************************************************
  213.   Version identification:
  214. ! @(#)Linker.cc    2.26    4/14/93
  215.   
  216.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  217.   All rights reserved.
  218. ***************
  219. *** 167,173 ****
  220.   // to permit easy interfacing with Tcl.
  221.   
  222.   int Linker::multiLink (int argc, char** argv) {
  223. !     if (!symTableName) {
  224.           Error::abortRun ("Incremental linking disabled");
  225.           return FALSE;
  226.       }
  227. --- 167,178 ----
  228.   // to permit easy interfacing with Tcl.
  229.   
  230.   int Linker::multiLink (int argc, char** argv) {
  231. !     if (linkingNotSupported) {
  232. !         Error::abortRun ("Sorry, incremental linking is not yet ",
  233. !                  "supported on this architecture");
  234. !         return FALSE;
  235. !     }
  236. !     else if (!symTableName) {
  237.           Error::abortRun ("Incremental linking disabled");
  238.           return FALSE;
  239.       }
  240. *** ./src/kernel/Linker.sysdep.h    Wed Nov 25 20:44:25 1992
  241. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/kernel/Linker.sysdep.h    Wed Apr 14 15:28:59 1993
  242. ***************
  243. *** 1,6 ****
  244.   /**************************************************************************
  245.   Version identification:
  246. ! @(#)Linker.sysdep.h    2.8    11/25/92
  247.   
  248.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  249.   All rights reserved.
  250. --- 1,6 ----
  251.   /**************************************************************************
  252.   Version identification:
  253. ! @(#)Linker.sysdep.h    2.9    4/14/93
  254.   
  255.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  256.   All rights reserved.
  257. ***************
  258. *** 30,36 ****
  259. --- 30,48 ----
  260.   
  261.    This file defines the system-dependent cruft needed for incremental
  262.    linking.
  263. +  The stuff for HP is not yet completed, hence linkingNotSupported is
  264. +  true.
  265.   **************************************************************************/
  266. + // Is linking supported?  Currently not complete for HP/UX.
  267. + const int linkingNotSupported =
  268. + #ifdef hpux
  269. +  1;
  270. + #else
  271. +  0;
  272. + #endif
  273.   
  274.   // The loader should do incremental linking; use a 4.3/Sun-style loader
  275.   // or use the Gnu loader.
  276. *** ./src/kernel/Particle.cc    Wed Nov 25 20:39:59 1992
  277. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/kernel/Particle.cc    Mon Apr 12 17:49:47 1993
  278. ***************
  279. *** 1,7 ****
  280.   static const char file_id[] = "Particle.cc";
  281.   /**************************************************************************
  282.   Version identification:
  283. ! @(#)Particle.cc    2.17    11/25/92
  284.   
  285.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  286.   All rights reserved.
  287. --- 1,7 ----
  288.   static const char file_id[] = "Particle.cc";
  289.   /**************************************************************************
  290.   Version identification:
  291. ! @(#)Particle.cc    2.19    4/10/93
  292.   
  293.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  294.   All rights reserved.
  295. ***************
  296. *** 207,218 ****
  297.   
  298.   int ComplexParticle :: operator == (const Particle& p) {
  299.       if (!typesEqual(p)) return 0;
  300. !     Complex pdata = Complex(data);
  301. !     return data.real() == pdata.real() &&
  302. !         data.imag() == pdata.imag();
  303.   }
  304.   
  305.   DataType ComplexParticle :: type() const {return COMPLEX;}
  306.    
  307.           // Cast to an int, double, Complex
  308. --- 207,215 ----
  309.   
  310.   int ComplexParticle :: operator == (const Particle& p) {
  311.       if (!typesEqual(p)) return 0;
  312. !     return data == Complex(p);
  313.   }
  314.   
  315.   DataType ComplexParticle :: type() const {return COMPLEX;}
  316.    
  317.           // Cast to an int, double, Complex
  318. ***************
  319. *** 248,258 ****
  320.   // created object.
  321.   
  322.   ParticleStack :: ~ParticleStack () {
  323. !     if (!head) return;
  324.       Particle* p;
  325. !     while (head->link) {
  326. !         p = head;
  327. !         head = head->link;
  328.           LOG_DEL; delete p;
  329.       }
  330.   }
  331. --- 245,255 ----
  332.   // created object.
  333.   
  334.   ParticleStack :: ~ParticleStack () {
  335. !     if (!pHead) return;
  336.       Particle* p;
  337. !     while (pHead->link) {
  338. !         p = pHead;
  339. !         pHead = pHead->link;
  340.           LOG_DEL; delete p;
  341.       }
  342.   }
  343. ***************
  344. *** 261,269 ****
  345.   // the last one)
  346.   void ParticleStack :: freeup () {
  347.       Particle* p;
  348. !     while (head) {
  349. !         p = head;
  350. !         head = head->link;
  351.           p->die();
  352.       }
  353.   }
  354. --- 258,266 ----
  355.   // the last one)
  356.   void ParticleStack :: freeup () {
  357.       Particle* p;
  358. !     while (pHead) {
  359. !         p = pHead;
  360. !         pHead = pHead->link;
  361.           p->die();
  362.       }
  363.   }
  364. ***************
  365. *** 273,279 ****
  366.       Plasma* p = plasmaList;
  367.   
  368.       while (p) {
  369. !         DataType dt = p->head->type();
  370.           if (t == dt) return p;
  371.           p = p->nextPlasma;
  372.       }
  373. --- 270,276 ----
  374.       Plasma* p = plasmaList;
  375.   
  376.       while (p) {
  377. !         DataType dt = p->type();
  378.           if (t == dt) return p;
  379.           p = p->nextPlasma;
  380.       }
  381. *** ./src/kernel/ParticleStack.h    Wed Nov 25 20:44:52 1992
  382. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/kernel/ParticleStack.h    Mon Apr 12 17:49:47 1993
  383. ***************
  384. *** 2,8 ****
  385.   #define _ParticleStack_h
  386.   /***************************************************************
  387.   Version identification:
  388. ! @(#)ParticleStack.h    2.3    11/25/92
  389.   
  390.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  391.   All rights reserved.
  392. --- 2,8 ----
  393.   #define _ParticleStack_h
  394.   /***************************************************************
  395.   Version identification:
  396. ! @(#)ParticleStack.h    2.4    4/10/93
  397.   
  398.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  399.   All rights reserved.
  400. ***************
  401. *** 56,71 ****
  402.   public:
  403.       // put a particle onto the stack
  404.       void put(Particle* p) {
  405. !         if (!head) tail = p;
  406. !         p->link = head; head = p;
  407.       }
  408.   
  409.       // get a particle from the stack.
  410.       // derived classes must do the empty-stack check!
  411. !     // if we get the last, tail will still point to it.
  412.       Particle* get() {
  413. !         Particle* p = head;
  414. !         head = p->link;
  415.           return p;
  416.       }
  417.   
  418. --- 56,73 ----
  419.   public:
  420.       // put a particle onto the stack
  421.       void put(Particle* p) {
  422. !         if (!pHead) pTail = p;
  423. !         p->link = pHead; pHead = p;
  424.       }
  425.   
  426.       // get a particle from the stack.
  427.       // derived classes must do the empty-stack check!
  428. !     // if we get the last, pTail will still point to it.
  429. !     // however, tail() will correctly return null.
  430.       Particle* get() {
  431. !         Particle* p = pHead;
  432. !         pHead = p->link;
  433.           return p;
  434.       }
  435.   
  436. ***************
  437. *** 72,91 ****
  438.       // put an article on the "tail" of the stack (to use the
  439.       // stack like a queue)
  440.       void putTail(Particle* p) {
  441. !         if (head) tail->link = p;
  442. !         else head = p;    // first particle
  443. !         tail = p;    // point to new last particle
  444.           p->link = 0;    // terminate the chain
  445.       }
  446.   
  447.       // empty stack check
  448. !     int empty() const { return head ? 0 : 1;}
  449.   
  450.       // return true if more than one member (for Plasma)
  451. !     int moreThanOne() const { return (head && head->link) ? 1 : 0;}
  452.   
  453.       // constructor (built with 0 or one particle)
  454. !     ParticleStack(Particle*h) : head(h), tail(h) {
  455.           // make sure the stack is "terminated"
  456.           if (h) h->link = 0;
  457.       }
  458. --- 74,93 ----
  459.       // put an article on the "tail" of the stack (to use the
  460.       // stack like a queue)
  461.       void putTail(Particle* p) {
  462. !         if (pHead) pTail->link = p;
  463. !         else pHead = p;    // first particle
  464. !         pTail = p;    // point to new last particle
  465.           p->link = 0;    // terminate the chain
  466.       }
  467.   
  468.       // empty stack check
  469. !     int empty() const { return pHead ? 0 : 1;}
  470.   
  471.       // return true if more than one member (for Plasma)
  472. !     int moreThanOne() const { return (pHead && pHead->link) ? 1 : 0;}
  473.   
  474.       // constructor (built with 0 or one particle)
  475. !     ParticleStack(Particle*h) : pHead(h), pTail(h) {
  476.           // make sure the stack is "terminated"
  477.           if (h) h->link = 0;
  478.       }
  479. ***************
  480. *** 95,103 ****
  481.   
  482.       // return all Particles to their Plasmas
  483.       void freeup ();
  484. ! protected:
  485. !     Particle* head;
  486.   private:
  487. !     Particle* tail;
  488.   };
  489.   #endif
  490. --- 97,110 ----
  491.   
  492.       // return all Particles to their Plasmas
  493.       void freeup ();
  494. !     // return ptr to head, tail respectively.
  495. !     Particle* head() const { return pHead;}
  496. !     // note that for an empty stack, pTail may not be 0,
  497. !     // hence the following code:
  498. !     Particle* tail() const { return pHead ? pTail : 0;}
  499.   private:
  500. !     Particle* pHead;
  501. !     Particle* pTail;
  502.   };
  503.   #endif
  504. *** ./src/kernel/PortHole.cc    Thu Dec 10 12:47:14 1992
  505. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/kernel/PortHole.cc    Mon Apr 12 17:49:49 1993
  506. ***************
  507. *** 17,23 ****
  508.    
  509.   /**************************************************************************
  510.   Version identification:
  511. ! @(#)PortHole.cc    2.43    12/10/92
  512.   
  513.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  514.   All rights reserved.
  515. --- 17,23 ----
  516.    
  517.   /**************************************************************************
  518.   Version identification:
  519. ! @(#)PortHole.cc    2.45    4/10/93
  520.   
  521.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  522.   All rights reserved.
  523. ***************
  524. *** 511,521 ****
  525.           Particle** p = myBuffer->next();
  526.           // Initialize particles on the buffer, so when we
  527.           // restart they do not contain old data
  528. !         (*p)->initialize();
  529.       }
  530.       // If this is an output PortHole (or connected to an
  531.       // input porthole), initialize myGeodesic
  532. !     if(myGeodesic && (isItOutput() || (!asEH() && atBoundary())))
  533.           myGeodesic->initialize();
  534.   }
  535.   
  536. --- 511,524 ----
  537.           Particle** p = myBuffer->next();
  538.           // Initialize particles on the buffer, so when we
  539.           // restart they do not contain old data
  540. !         // fill in any empty holes (which could be caused by
  541. !         // errors of some kinds in previous runs).
  542. !         if (*p)    (*p)->initialize();
  543. !         else *p = myPlasma->get();
  544.       }
  545.       // If this is an output PortHole (or connected to an
  546.       // input porthole), initialize myGeodesic
  547. !     if (far() && myGeodesic && (isItOutput() || (!asEH() && atBoundary())))
  548.           myGeodesic->initialize();
  549.   }
  550.   
  551. *** ./src/kernel/PortHole.h    Wed Nov 25 20:45:03 1992
  552. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/kernel/PortHole.h    Mon Apr 12 17:49:49 1993
  553. ***************
  554. *** 14,20 ****
  555.   
  556.   /**************************************************************************
  557.   Version identification:
  558. ! @(#)PortHole.h    2.25    11/25/92
  559.   
  560.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  561.   All rights reserved.
  562. --- 14,20 ----
  563.   
  564.   /**************************************************************************
  565.   Version identification:
  566. ! @(#)PortHole.h    2.26    2/17/93
  567.   
  568.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  569.   All rights reserved.
  570. ***************
  571. *** 359,366 ****
  572.       // class identification
  573.       int isA(const char*) const;
  574.   
  575. !     // am I at wormhole boundary?
  576. !     int atBoundary() const { return (isItInput() == far()->isItInput()); }
  577.   
  578.       // Return me as an eventHorizon
  579.       virtual EventHorizon* asEH();
  580. --- 359,371 ----
  581.       // class identification
  582.       int isA(const char*) const;
  583.   
  584. !     // am I at wormhole boundary?  Disconnected ports return true,
  585. !     // since we implement clusters that way (disconnected ports
  586. !     // represent the cluster boundary)
  587. !     int atBoundary() const {
  588. !         return (far() ? (isItInput() == far()->isItInput()) : TRUE);
  589. !     }
  590.   
  591.       // Return me as an eventHorizon
  592.       virtual EventHorizon* asEH();
  593. *** ./src/kernel/Plasma.h    Wed Nov 25 20:44:56 1992
  594. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/kernel/Plasma.h    Mon Apr 12 17:49:48 1993
  595. ***************
  596. *** 6,12 ****
  597.   #endif
  598.   /**************************************************************************
  599.   Version identification:
  600. ! @(#)Plasma.h    1.7    11/25/92
  601.   
  602.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  603.   All rights reserved.
  604. --- 6,12 ----
  605.   #endif
  606.   /**************************************************************************
  607.   Version identification:
  608. ! @(#)Plasma.h    1.8    4/10/93
  609.   
  610.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  611.   All rights reserved.
  612. ***************
  613. *** 71,79 ****
  614.               p->initialize();
  615.               return p;
  616.           }
  617. !         else return head->useNew();
  618.       }
  619. !     DataType type() { return head->type();}
  620.   
  621.   // constructor -- all objs built are added to the static linked list.
  622.       Plasma(Particle& p) : ParticleStack(&p), nextPlasma(plasmaList) {
  623. --- 71,79 ----
  624.               p->initialize();
  625.               return p;
  626.           }
  627. !         else return head()->useNew();
  628.       }
  629. !     DataType type() { return head()->type();}
  630.   
  631.   // constructor -- all objs built are added to the static linked list.
  632.       Plasma(Particle& p) : ParticleStack(&p), nextPlasma(plasmaList) {
  633. *** ./src/kernel/makefile    Thu Dec 10 15:52:02 1992
  634. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/kernel/makefile    Mon Apr 12 17:49:50 1993
  635. ***************
  636. *** 187,193 ****
  637.   DataStruct.o : DataStruct.cc DataStruct.h type.h logNew.h 
  638.   Display.o : Display.cc Display.h type.h logNew.h miscFuncs.h Error.h StringList.h \
  639.     DataStruct.h Block.h NamedObj.h isa.h PortHole.h dataType.h Particle.h ComplexSubset.h \
  640. !   Attribute.h State.h streamCompat.h paths.h 
  641.   DoubleLink.o : DoubleLink.cc DoubleLink.h type.h logNew.h 
  642.   Domain.o : Domain.cc Domain.h StringList.h miscFuncs.h logNew.h DataStruct.h \
  643.     type.h Star.h Block.h NamedObj.h isa.h PortHole.h dataType.h Particle.h ComplexSubset.h \
  644. --- 187,193 ----
  645.   DataStruct.o : DataStruct.cc DataStruct.h type.h logNew.h 
  646.   Display.o : Display.cc Display.h type.h logNew.h miscFuncs.h Error.h StringList.h \
  647.     DataStruct.h Block.h NamedObj.h isa.h PortHole.h dataType.h Particle.h ComplexSubset.h \
  648. !   Attribute.h State.h streamCompat.h paths.h SimControl.h 
  649.   DoubleLink.o : DoubleLink.cc DoubleLink.h type.h logNew.h 
  650.   Domain.o : Domain.cc Domain.h StringList.h miscFuncs.h logNew.h DataStruct.h \
  651.     type.h Star.h Block.h NamedObj.h isa.h PortHole.h dataType.h Particle.h ComplexSubset.h \
  652. *** ./src/kernel/pt_fstream.cc    Wed Nov 25 21:39:21 1992
  653. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/kernel/pt_fstream.cc    Mon Apr 12 17:49:50 1993
  654. ***************
  655. *** 26,32 ****
  656.   */
  657.   
  658.   // Programmer:  J. Buck, Kennard
  659. ! // @(#)pt_fstream.cc    1.6 11/25/92
  660.   
  661.   // This defines derived types of ifstream and ofstream that do the following:
  662.   
  663. --- 26,32 ----
  664.   */
  665.   
  666.   // Programmer:  J. Buck, Kennard
  667. ! // @(#)pt_fstream.cc    1.8 4/8/93
  668.   
  669.   // This defines derived types of ifstream and ofstream that do the following:
  670.   
  671. ***************
  672. *** 68,89 ****
  673.   // check for special file names
  674.   // This uses the hardcoded descriptors 0,1,2.  These are appropriate
  675.   // for UNIX only.
  676. ! static int check_special(const char *name, int *pNobufB) {
  677. !     int    fd = -1, bufB = TRUE;
  678.   
  679. !     /*IF*/ if ( strcmp(name,"<cin>")==0 || strcmp(name,"<stdin>")==0 ) {
  680. !         fd = 0;
  681. !     } else if ( strcmp(name,"<cout>")==0 || strcmp(name,"<stdout>")==0 ) {
  682. !         fd = 1;
  683. !         bufB = FALSE;
  684. !     } else if ( strcmp(name,"<cerr>")==0 || strcmp(name,"<stderr>")==0 ) {
  685. !         fd = 2;
  686. !         bufB = FALSE;
  687. !     } else if ( strcmp(name,"<clog>")==0 || strcmp(name,"<stdlog>")==0 ) {
  688. !         fd = 2;
  689.       }
  690. !     if ( pNobufB )
  691. !         *pNobufB = ! bufB;
  692.       return fd;
  693.   }
  694.   
  695. --- 68,99 ----
  696.   // check for special file names
  697.   // This uses the hardcoded descriptors 0,1,2.  These are appropriate
  698.   // for UNIX only.
  699. ! static int check_special(const char *name, int &nobufB) {
  700. !     int    fd = -1;
  701. !     nobufB = FALSE;
  702.   
  703. ! // see if we begin with "<c" or "<std".  If so, skip prefix, else
  704. ! // exit immediately.
  705. !     if (*name != '<') return fd;
  706. !     if (name[1] == 'c') name += 2;
  707. !     else if (strncmp(name+1,"std", 3) == 0) name += 4;
  708. !     else return -1;
  709. ! // look for remainder of standard names.
  710. !     if (strcmp(name,"in>") == 0)
  711. !         fd = 0;
  712. !     else if (strcmp(name,"out>") == 0)
  713. !     {
  714. !         fd = 1;
  715. !         nobufB = TRUE;
  716.       }
  717. !     else if ( strcmp(name,"err>")==0)
  718. !     {
  719. !         fd = 2;
  720. !         nobufB = TRUE;
  721. !     }
  722. !     else if ( strcmp(name,"log>")==0)
  723. !         fd = 2;
  724.       return fd;
  725.   }
  726.   
  727. ***************
  728. *** 91,103 ****
  729.       open(name,mode,prot);
  730.   }
  731.   
  732.   void pt_ifstream::open(const char* name, int mode, int prot) {
  733. !     int    nobufB;
  734. !     int    fd = check_special(name, &nobufB);
  735. !     if ( fd >= 0 )        rdbuf()->attach(fd);
  736. !     else            ifstream::open(expand(name),mode,prot);
  737. !     if (!*this)    reportError("reading");
  738. !     if (nobufB)    setf(unitbuf);
  739.   }
  740.   
  741.   pt_ofstream::pt_ofstream(const char *name,int mode, int prot) {
  742. --- 101,120 ----
  743.       open(name,mode,prot);
  744.   }
  745.   
  746. + // open file, treating some names as special.
  747.   void pt_ifstream::open(const char* name, int mode, int prot) {
  748. !     int nobufB;
  749. !     int fd = check_special(name, nobufB);
  750. !     if (fd == 0) rdbuf()->attach(fd);
  751. !     else if (fd > 0) {
  752. !         Error::abortRun("Can't open ", name,
  753. !                 " for reading: write-only file descriptor");
  754. !         return;
  755. !     }
  756. !     else ifstream::open(expand(name),mode,prot);
  757. !     if (!*this) reportError("reading");
  758. !     if (nobufB) setf(unitbuf);
  759.   }
  760.   
  761.   pt_ofstream::pt_ofstream(const char *name,int mode, int prot) {
  762. ***************
  763. *** 105,114 ****
  764.   }
  765.   
  766.   void pt_ofstream::open(const char* name, int mode, int prot) {
  767. !     int    nobufB;
  768. !     int    fd = check_special(name, &nobufB);
  769. !     if ( fd >= 0 )        rdbuf()->attach(fd);
  770. !     else            ofstream::open(expand(name),mode,prot);
  771.       if (!*this) reportError("writing");
  772. !     if (nobufB)    setf(unitbuf);
  773.   }
  774. --- 122,136 ----
  775.   }
  776.   
  777.   void pt_ofstream::open(const char* name, int mode, int prot) {
  778. !     int nobufB;
  779. !     int fd = check_special(name, nobufB);
  780. !     if (fd == 0) {
  781. !         Error::abortRun("Can't open ", name,
  782. !                 " for writing: can't write to standard input");
  783. !         return;
  784. !     }
  785. !     else if (fd > 0) rdbuf()->attach(fd);
  786. !     else ofstream::open(expand(name),mode,prot);
  787.       if (!*this) reportError("writing");
  788. !     if (nobufB) setf(unitbuf);
  789.   }
  790. *** ./src/kernel/pt_fstream.h    Wed Nov 25 21:39:20 1992
  791. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/kernel/pt_fstream.h    Mon Apr 12 17:49:51 1993
  792. ***************
  793. *** 31,37 ****
  794.   */
  795.   
  796.   // Programmer:  J. Buck
  797. ! // @(#)pt_fstream.h    1.4 11/25/92
  798.   
  799.   // This defines derived types of ifstream and ofstream that do the following:
  800.   
  801. --- 31,37 ----
  802.   */
  803.   
  804.   // Programmer:  J. Buck
  805. ! // @(#)pt_fstream.h    1.5 3/30/93
  806.   
  807.   // This defines derived types of ifstream and ofstream that do the following:
  808.   
  809. ***************
  810. *** 43,48 ****
  811. --- 43,54 ----
  812.   //    (and <stdin>, <stdout> ,<stderr>) are recognized.
  813.   //
  814.   // Otherwise they are the same as their baseclasses.
  815. + //
  816. + // Warning: calling close() on a pt_ofstream that writes to <cerr> will
  817. + // close the standard error stream, with probably disasterous results.
  818. + // Calling the destructor, however, will do the right thing.  Overriding
  819. + // close() is not sufficient to solve this because of the design of the
  820. + // fstream and filebuf classes.
  821.   
  822.   #include <fstream.h>
  823.   
  824. *** ./src/ptcl/PTcl.cc    Tue Dec  1 18:36:31 1992
  825. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/ptcl/PTcl.cc    Mon Apr 12 17:47:51 1993
  826. ***************
  827. *** 1,6 ****
  828.   /**************************************************************************
  829.   Version identification:
  830. ! @(#)PTcl.cc    1.11    12/1/92
  831.   
  832.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  833.   All rights reserved.
  834. --- 1,6 ----
  835.   /**************************************************************************
  836.   Version identification:
  837. ! @(#)PTcl.cc    1.12    2/17/93
  838.   
  839.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  840.   All rights reserved.
  841. ***************
  842. *** 108,114 ****
  843.   PTcl::~PTcl() {
  844.       LOG_DEL; delete universe;
  845.       removeEntry();
  846. !     if (myInterp) { LOG_DEL; delete interp;}
  847.   }
  848.   
  849.   // Attach the PTcl to a new universe
  850. --- 108,117 ----
  851.   PTcl::~PTcl() {
  852.       LOG_DEL; delete universe;
  853.       removeEntry();
  854. !     if (myInterp) {
  855. !         Tcl_DeleteInterp(interp);
  856. !         interp = 0;
  857. !     }
  858.   }
  859.   
  860.   // Attach the PTcl to a new universe
  861. *** ./src/ptcl/ptclError.cc    Tue Dec  1 18:42:09 1992
  862. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/ptcl/ptclError.cc    Mon Apr 12 17:47:52 1993
  863. ***************
  864. *** 1,7 ****
  865.   static const char file_id[] = "ptclError.cc";
  866.   /*******************************************************************
  867.   SCCS Version identification :
  868. ! @(#)ptclError.cc    1.8    12/1/92
  869.   
  870.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  871.   All rights reserved.
  872. --- 1,7 ----
  873.   static const char file_id[] = "ptclError.cc";
  874.   /*******************************************************************
  875.   SCCS Version identification :
  876. ! @(#)ptclError.cc    1.9    4/8/93
  877.   
  878.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  879.   All rights reserved.
  880. ***************
  881. *** 58,63 ****
  882. --- 58,64 ----
  883.           p3(m1,m2,m3);
  884.           return;
  885.       }
  886. + // if there is already a result, append to it.
  887.       char* res = PTcl::activeInterp->result;
  888.       StringList msg;
  889.       if (res && *res)
  890. ***************
  891. *** 78,97 ****
  892.   
  893.   void
  894.   Error :: error (const NamedObj& o, cc* m1, cc* m2, cc* m3) {
  895. !     if (PTcl::activeInterp == 0) {
  896. !         cerr << "ERROR: ";
  897. !         Error::message(o,m1,m2,m3);
  898. !         return;
  899. !     }
  900. !     if (!m2) m2 = "";
  901. !     if (!m3) m3 = "";
  902. !     StringList s = o.fullName();
  903. !     const char* name = s;
  904. !     int l = strlen(name) + strlen(m1) + strlen(m2) + strlen(m3) + 10;
  905. !     LOG_NEW; char* msg = new char[l];
  906. !     sprintf (msg, "ERROR: %s: %s%s%s", name, m1, m2, m3);
  907. !     Tcl_SetResult(PTcl::activeInterp, msg, TCL_VOLATILE);
  908. !     LOG_DEL; delete msg;
  909.   }
  910.   
  911.   void
  912. --- 79,87 ----
  913.   
  914.   void
  915.   Error :: error (const NamedObj& o, cc* m1, cc* m2, cc* m3) {
  916. !     StringList n_m1 = o.fullName();
  917. !     n_m1 << ":" << m1;
  918. !     error(n_m1,m2,m3);
  919.   }
  920.   
  921.   void
  922. *** ./src/pigilib/compile.c    Wed Nov 25 21:25:30 1992
  923. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/pigilib/compile.c    Mon Apr 12 17:50:29 1993
  924. ***************
  925. *** 24,30 ****
  926.   */
  927.   /* compile.c  edg
  928.   Version identification:
  929. ! @(#)compile.c    1.24    11/25/92
  930.   Updates:
  931.       4/16/90 = added Oct change lists to keep track of changes so that only
  932.       facets that the user changes get compiled.
  933. --- 24,30 ----
  934.   */
  935.   /* compile.c  edg
  936.   Version identification:
  937. ! @(#)compile.c    1.25    1/19/93
  938.   Updates:
  939.       4/16/90 = added Oct change lists to keep track of changes so that only
  940.       facets that the user changes get compiled.
  941. ***************
  942. *** 44,53 ****
  943.   */
  944.   
  945.   /* Includes */
  946.   #include <stdio.h>
  947.   #include <strings.h>
  948.   #include <errno.h>
  949. - #include "local.h"
  950.   #include "rpc.h"
  951.   #include "paramStructs.h"
  952.   #include "vemInterface.h"
  953. --- 44,53 ----
  954.   */
  955.   
  956.   /* Includes */
  957. + #include "local.h"
  958.   #include <stdio.h>
  959.   #include <strings.h>
  960.   #include <errno.h>
  961.   #include "rpc.h"
  962.   #include "paramStructs.h"
  963.   #include "vemInterface.h"
  964. ***************
  965. *** 429,434 ****
  966. --- 429,436 ----
  967.   Emits connect, input, and output statements.
  968.   */
  969.   #define BLEN 80
  970. + static boolean TermIsMulti();
  971.   
  972.   static boolean
  973.   ConnectPass(facetPtr)
  974. *** ./src/pigilib/edit.c    Wed Nov 25 21:25:37 1992
  975. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/pigilib/edit.c    Mon Apr 12 17:50:29 1993
  976. ***************
  977. *** 24,30 ****
  978.   */
  979.   /* edit.c  edg
  980.   Version identification:
  981. ! @(#)edit.c    1.31    11/25/92
  982.   */
  983.   
  984.   
  985. --- 24,30 ----
  986.   */
  987.   /* edit.c  edg
  988.   Version identification:
  989. ! @(#)edit.c    1.32    1/19/93
  990.   */
  991.   
  992.   
  993. ***************
  994. *** 94,105 ****
  995.   octObject *instPtr;
  996.   {
  997.       octObject busProp;
  998. -     static dmTextItem item = {"Bus Width", 1, 10, NULL, NULL};
  999.       GetOrInitBusProp(instPtr, &busProp);
  1000.       return editBusOrDelay(&busProp,"Bus Width","Edit Bus Width");
  1001.   }
  1002.   
  1003.   /* EditSogParams  5/27/88
  1004.   Outputs: return = TRUE if no error.
  1005.   */
  1006. --- 94,105 ----
  1007.   octObject *instPtr;
  1008.   {
  1009.       octObject busProp;
  1010.       GetOrInitBusProp(instPtr, &busProp);
  1011.       return editBusOrDelay(&busProp,"Bus Width","Edit Bus Width");
  1012.   }
  1013.   
  1014. + static boolean EditParamList();
  1015.   /* EditSogParams  5/27/88
  1016.   Outputs: return = TRUE if no error.
  1017.   */
  1018. ***************
  1019. *** 181,190 ****
  1020.   EditFormalParams(galFacetPtr)
  1021.   octObject *galFacetPtr;
  1022.   {
  1023. !     ParamType *place;
  1024. !     int i, width, maxwidth;
  1025.       ParamListType pList;
  1026. -     dmTextItem *items;
  1027.   
  1028.       ERR_IF1(!GetFormalParams(galFacetPtr, &pList));
  1029.   
  1030. --- 181,188 ----
  1031.   EditFormalParams(galFacetPtr)
  1032.   octObject *galFacetPtr;
  1033.   {
  1034. !     int i;
  1035.       ParamListType pList;
  1036.   
  1037.       ERR_IF1(!GetFormalParams(galFacetPtr, &pList));
  1038.   
  1039. ***************
  1040. *** 410,416 ****
  1041.   boolean
  1042.   OpenPaletteInit()
  1043.   {
  1044. !     char *a, *b, *copy, *techDir, buf[FILENAME_MAX];
  1045.       int i;
  1046.   
  1047.   /* dots in resource names no longer work??? */
  1048. --- 408,414 ----
  1049.   boolean
  1050.   OpenPaletteInit()
  1051.   {
  1052. !     char *a, *b, *copy, *techDir, buf[MAXPATHLEN];
  1053.       int i;
  1054.   
  1055.   /* dots in resource names no longer work??? */
  1056. *** ./src/pigilib/err.c    Wed Nov 25 21:25:42 1992
  1057. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/pigilib/err.c    Mon Apr 12 17:50:30 1993
  1058. ***************
  1059. *** 24,36 ****
  1060.   */
  1061.   /* err.c  edg
  1062.   Version identification:
  1063. ! @(#)err.c    1.2    11/25/92
  1064.   Error handling functions.
  1065.   */
  1066.   
  1067.   /* Includes */
  1068. - #include <stdio.h>
  1069.   #include "local.h"
  1070.   
  1071.   #define ERR_BUF_N 1000
  1072.   
  1073. --- 24,36 ----
  1074.   */
  1075.   /* err.c  edg
  1076.   Version identification:
  1077. ! @(#)err.c    1.3    1/19/93
  1078.   Error handling functions.
  1079.   */
  1080.   
  1081.   /* Includes */
  1082.   #include "local.h"
  1083. + #include <stdio.h>
  1084.   
  1085.   #define ERR_BUF_N 1000
  1086.   
  1087. *** ./src/pigilib/exec.c    Wed Nov 25 21:25:49 1992
  1088. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/pigilib/exec.c    Mon Apr 12 17:50:30 1993
  1089. ***************
  1090. *** 24,37 ****
  1091.   */
  1092.   /* exec.c  edg
  1093.   Version identification:
  1094. ! @(#)exec.c    1.15    11/25/92
  1095.   */
  1096.   
  1097.   
  1098.   /* Includes */
  1099.   #include <stdio.h>
  1100.   #include <strings.h>
  1101. - #include "local.h"
  1102.   #include "rpc.h"
  1103.   #include "vemInterface.h"
  1104.   #include "compile.h"
  1105. --- 24,37 ----
  1106.   */
  1107.   /* exec.c  edg
  1108.   Version identification:
  1109. ! @(#)exec.c    1.16    1/19/93
  1110.   */
  1111.   
  1112.   
  1113.   /* Includes */
  1114. + #include "local.h"
  1115.   #include <stdio.h>
  1116.   #include <strings.h>
  1117.   #include "rpc.h"
  1118.   #include "vemInterface.h"
  1119.   #include "compile.h"
  1120. ***************
  1121. *** 40,45 ****
  1122. --- 40,47 ----
  1123.   #include "edit.h"
  1124.   #include "err.h"
  1125.   #include "util.h"
  1126. + #include "ganttIfc.h"
  1127.   #if defined(PTK)
  1128.   #include "ptk.h"  /* Interpreter name, window name, etc.  aok */
  1129.   #include "ptkCalls.h"  /* C utilities for using tcl from pigi.  aok */
  1130. ***************
  1131. *** 307,314 ****
  1132.   lsList cmdList;
  1133.   long userOptionWord;
  1134.   {
  1135. -     octObject facet;
  1136.       ViInit("display-schedule");
  1137.       ErrClear();
  1138.       FindClear();
  1139. --- 309,314 ----
  1140. *** ./src/pigilib/ganttIfc.c    Wed Nov 25 21:25:58 1992
  1141. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/pigilib/ganttIfc.c    Mon Apr 12 17:50:31 1993
  1142. ***************
  1143. *** 24,35 ****
  1144.   */
  1145.   /*  ganttIfc.c  edg
  1146.   Version identification:
  1147. ! @(#)ganttIfc.c    1.7    11/25/92
  1148.   */
  1149.   
  1150.   /* Includes */
  1151. - #include <stdio.h>
  1152.   #include "local.h"
  1153.   #include "rpc.h"
  1154.   #include "err.h"
  1155.   #include "ganttIfc.h"
  1156. --- 24,35 ----
  1157.   */
  1158.   /*  ganttIfc.c  edg
  1159.   Version identification:
  1160. ! @(#)ganttIfc.c    1.8    1/19/93
  1161.   */
  1162.   
  1163.   /* Includes */
  1164.   #include "local.h"
  1165. + #include <stdio.h>
  1166.   #include "rpc.h"
  1167.   #include "err.h"
  1168.   #include "ganttIfc.h"
  1169. ***************
  1170. *** 204,209 ****
  1171. --- 204,210 ----
  1172.       ViDone();
  1173.   }
  1174.   
  1175. + void
  1176.   FindAndMarkError(facetP, name)
  1177.   octObject *facetP;
  1178.   char *name;
  1179. *** ./src/pigilib/ganttIfc.h    Wed Nov 25 21:27:48 1992
  1180. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/pigilib/ganttIfc.h    Mon Apr 12 17:50:31 1993
  1181. ***************
  1182. *** 24,30 ****
  1183.   */
  1184.   /*  ganttIfc.h  edg
  1185.   Version identification:
  1186. ! @(#)ganttIfc.h    1.2    11/25/92
  1187.   */
  1188.   
  1189.   extern void FrameSetFacet();
  1190. --- 24,30 ----
  1191.   */
  1192.   /*  ganttIfc.h  edg
  1193.   Version identification:
  1194. ! @(#)ganttIfc.h    1.3    1/19/93
  1195.   */
  1196.   
  1197.   extern void FrameSetFacet();
  1198. ***************
  1199. *** 34,39 ****
  1200. --- 34,40 ----
  1201.   extern int DestroyFrames();
  1202.   extern int GanttMan();
  1203.   extern void GanttErr();
  1204. + extern void FindAndMarkError();
  1205.   
  1206.   /* Functions below should only be called by GGI */
  1207.   extern boolean GanttRun();
  1208. *** ./src/pigilib/icon.c    Mon Dec  7 17:20:39 1992
  1209. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/pigilib/icon.c    Mon Apr 12 17:50:32 1993
  1210. ***************
  1211. *** 24,40 ****
  1212.   */
  1213.   /*
  1214.       icon.c  edg
  1215. !     Version: @(#)icon.c    2.16 12/7/92
  1216.   */
  1217.   
  1218.   
  1219.   /* Includes */
  1220.   #include <stdio.h>
  1221.   #include <sys/file.h>
  1222.   #include <sys/param.h>
  1223.   #include <sys/stat.h>
  1224.   #include <pwd.h>
  1225. - #include "local.h"
  1226.   #include "rpc.h"
  1227.   #include "util.h"
  1228.   #include "err.h"
  1229. --- 24,40 ----
  1230.   */
  1231.   /*
  1232.       icon.c  edg
  1233. !     Version: @(#)icon.c    2.17 1/19/93
  1234.   */
  1235.   
  1236.   
  1237.   /* Includes */
  1238. + #include "local.h"
  1239.   #include <stdio.h>
  1240.   #include <sys/file.h>
  1241.   #include <sys/param.h>
  1242.   #include <sys/stat.h>
  1243.   #include <pwd.h>
  1244.   #include "rpc.h"
  1245.   #include "util.h"
  1246.   #include "err.h"
  1247. ***************
  1248. *** 111,136 ****
  1249.       if (background) strcat(buf, "&");
  1250.   }
  1251.   
  1252. - /* 5/8/90
  1253. - Open a window and run xedit (or user selected program) on a file.
  1254. - Does not run in the background.
  1255. - This routine does not return until program is exited.
  1256. - */
  1257. - static boolean
  1258. - EditFile(fileName)
  1259. - char *fileName;
  1260. - {
  1261. -     char buf[512];
  1262. -     genDispCommand(buf, fileName, 0);
  1263. -     PrintDebug(buf);
  1264. -     if (util_csystem(buf)) {
  1265. -     sprintf(buf, "Cannot edit Ptolemy code file '%s'", fileName);
  1266. -     ErrAdd(buf);
  1267. -     return(FALSE);
  1268. -     }
  1269. -     return (TRUE);
  1270. - }
  1271.   /* 8/3/90
  1272.   Open a window and run xedit on a file.
  1273.   Runs in the background and returns immediately.
  1274. --- 111,116 ----
  1275. ***************
  1276. *** 512,518 ****
  1277.   IconFileToSourceFile (iconFile, sourceFile, domain)
  1278.   char* iconFile, *sourceFile, *domain;
  1279.   {
  1280. !     char dir[512], *base, *dom;
  1281.       int i, n;
  1282.   
  1283.       strcpy (dir, iconFile);
  1284. --- 492,498 ----
  1285.   IconFileToSourceFile (iconFile, sourceFile, domain)
  1286.   char* iconFile, *sourceFile, *domain;
  1287.   {
  1288. !     char dir[512], *base, *dom = 0;
  1289.       int i, n;
  1290.   
  1291.       strcpy (dir, iconFile);
  1292. *** ./src/pigilib/kernelCalls.cc    Thu Nov 26 00:45:37 1992
  1293. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/pigilib/kernelCalls.cc    Mon Apr 12 17:50:32 1993
  1294. ***************
  1295. *** 1,7 ****
  1296.   static const char file_id[] = "kernelCalls.cc";
  1297.   /* 
  1298.   Version identification:
  1299. ! @(#)kernelCalls.cc    2.47    11/26/92
  1300.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  1301.   All rights reserved.
  1302.   
  1303. --- 1,7 ----
  1304.   static const char file_id[] = "kernelCalls.cc";
  1305.   /* 
  1306.   Version identification:
  1307. ! @(#)kernelCalls.cc    2.48    2/17/93
  1308.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  1309.   All rights reserved.
  1310.   
  1311. ***************
  1312. *** 260,265 ****
  1313. --- 260,266 ----
  1314.       const char* dom = KnownBlock::domain();
  1315.       if (strcmp(dom, oldDom) == 0) return;
  1316.       LOG << "domain " << dom << "\n";
  1317. +     oldDom = dom;
  1318.   }
  1319.   
  1320.   // Return the domain of an object: note, it may not be the current
  1321. *** ./src/pigilib/local.h    Wed Nov 25 21:28:04 1992
  1322. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/pigilib/local.h    Mon Apr 12 17:50:33 1993
  1323. ***************
  1324. *** 22,53 ****
  1325.   ENHANCEMENTS, OR MODIFICATIONS.
  1326.                               COPYRIGHTENDKEY
  1327.   */
  1328.   /* local.h  edg
  1329.   Version identification:
  1330. ! @(#)local.h    1.4    11/25/92
  1331.   This is a local include file for useful macros and definitions.
  1332.   */
  1333.   
  1334.   /* boolean data type */
  1335.   typedef int boolean;
  1336. ! #define TRUE    (1)
  1337. ! #define FALSE    (0)
  1338.   
  1339.   #define EOS '\0' /* end of string */
  1340.   
  1341. ! extern char *calloc();
  1342. ! /*
  1343. ! extern void free();
  1344. ! */
  1345.   #ifdef USG
  1346. ! extern int sprintf();
  1347.   #else
  1348. ! extern char *sprintf();
  1349.   #endif
  1350.   
  1351.   /* buffer length constants */
  1352.   #define MSG_BUF_MAX 512 /* for messages */
  1353.   
  1354. - #ifndef FILENAME_MAX
  1355. - #define FILENAME_MAX 512 /* for filename paths */
  1356.   #endif
  1357. --- 22,66 ----
  1358.   ENHANCEMENTS, OR MODIFICATIONS.
  1359.                               COPYRIGHTENDKEY
  1360.   */
  1361. + #ifndef _local_h
  1362. + #define _local_h 1
  1363.   /* local.h  edg
  1364.   Version identification:
  1365. ! @(#)local.h    1.5    1/19/93
  1366.   This is a local include file for useful macros and definitions.
  1367.   */
  1368.   
  1369. + #include "ansi.h"
  1370. + #ifdef HAS_STDARG
  1371. + #include <stddef.h>
  1372. + #define RAW_PTR void *
  1373. + #else
  1374. + #define RAW_PTR char *
  1375. + #endif
  1376.   /* boolean data type */
  1377.   typedef int boolean;
  1378. ! #define TRUE    1
  1379. ! #define FALSE    0
  1380.   
  1381.   #define EOS '\0' /* end of string */
  1382.   
  1383. ! extern RAW_PTR calloc ARGS((size_t,size_t));
  1384. ! extern RAW_PTR malloc ARGS((size_t));
  1385. ! #include <sys/param.h>
  1386.   #ifdef USG
  1387. ! extern int sprintf ARGS((char*, const char*, ...));
  1388. ! extern char *getcwd ARGS((char *,size_t));
  1389. ! #define getwd(foo) getcwd(foo,MAXPATHLEN-1)
  1390.   #else
  1391. ! extern char *sprintf ARGS((char*, const char*, ...));
  1392. ! extern char *getwd ARGS((char *));
  1393.   #endif
  1394.   
  1395.   /* buffer length constants */
  1396.   #define MSG_BUF_MAX 512 /* for messages */
  1397.   
  1398.   #endif
  1399. *** ./src/pigilib/main.c    Tue Dec  1 22:46:04 1992
  1400. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/pigilib/main.c    Mon Apr 12 17:50:33 1993
  1401. ***************
  1402. *** 24,36 ****
  1403.   */
  1404.   /*  main.c  edg  5/9/90
  1405.   Version identification:
  1406. ! @(#)main.c    2.21    12/1/92
  1407.   Initialization code for pigiRpc.
  1408.   */
  1409.   
  1410.   /* Includes */
  1411. - #include <stdio.h>
  1412.   #include "local.h"
  1413.   #include "rpc.h"
  1414.   #include "vemInterface.h"
  1415.   #include "compile.h"
  1416. --- 24,36 ----
  1417.   */
  1418.   /*  main.c  edg  5/9/90
  1419.   Version identification:
  1420. ! @(#)main.c    2.22    1/19/93
  1421.   Initialization code for pigiRpc.
  1422.   */
  1423.   
  1424.   /* Includes */
  1425.   #include "local.h"
  1426. + #include <stdio.h>
  1427.   #include "rpc.h"
  1428.   #include "vemInterface.h"
  1429.   #include "compile.h"
  1430. ***************
  1431. *** 97,102 ****
  1432. --- 97,103 ----
  1433.   {
  1434.       CompileEnd();
  1435.       RPCExit(0);
  1436. +     return 0;
  1437.   }
  1438.   
  1439.   
  1440. ***************
  1441. *** 135,140 ****
  1442. --- 136,143 ----
  1443.       {ExitApp, "Other", "exit-pigi"}
  1444.   };
  1445.   
  1446. + static void welcome_window();
  1447.   long
  1448.   UserMain(display, spot, cmdList, userOptionWord, array) /* ARGSUSED */
  1449.   char *display;
  1450. ***************
  1451. *** 177,183 ****
  1452.   
  1453.   void pr_accum_string();
  1454.   
  1455. ! welcome_window ()
  1456.   {
  1457.       accum_string ("Ptolemy Interactive Graphics Interface\n");
  1458.       accum_string (pigiVersion);
  1459. --- 180,186 ----
  1460.   
  1461.   void pr_accum_string();
  1462.   
  1463. ! static void welcome_window ()
  1464.   {
  1465.       accum_string ("Ptolemy Interactive Graphics Interface\n");
  1466.       accum_string (pigiVersion);
  1467. *** ./src/pigilib/makefile    Thu Oct 22 17:44:15 1992
  1468. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/pigilib/makefile    Mon Apr 12 17:50:34 1993
  1469. ***************
  1470. *** 88,154 ****
  1471.   # Don't add anything after the next line; makedepend will zap it.
  1472.   # DO NOT DELETE THIS LINE -- make depend depends on it.
  1473.   
  1474. ! main.o : main.c local.h ../../octtools/include/rpc.h ../../octtools/include/port.h \
  1475. !   ../../octtools/include/oct.h ../../octtools/include/ansi.h ../../octtools/include/list.h \
  1476.     ../../octtools/include/copyright.h ../../octtools/include/region.h vemInterface.h \
  1477.     compile.h edit.h exec.h util.h icon.h misc.h ganttIfc.h options.h utilities.h \
  1478.     err.h 
  1479. ! util.o : util.c local.h err.h util.h ../../octtools/include/rpc.h ../../octtools/include/port.h \
  1480. !   ../../octtools/include/oct.h ../../octtools/include/ansi.h ../../octtools/include/list.h \
  1481.     ../../octtools/include/copyright.h ../../octtools/include/region.h octIfc.h \
  1482.     vemInterface.h 
  1483.   utilities.o : utilities.c ../../octtools/include/rpc.h ../../octtools/include/port.h \
  1484.     ../../octtools/include/oct.h ../../octtools/include/ansi.h ../../octtools/include/list.h \
  1485.     ../../octtools/include/copyright.h ../../octtools/include/region.h exec.h 
  1486. ! compile.o : compile.c local.h ../../octtools/include/rpc.h ../../octtools/include/port.h \
  1487. !   ../../octtools/include/oct.h ../../octtools/include/ansi.h ../../octtools/include/list.h \
  1488.     ../../octtools/include/copyright.h ../../octtools/include/region.h paramStructs.h \
  1489.     vemInterface.h util.h err.h main.h octIfc.h octMacros.h 
  1490. ! paramStructs.o : paramStructs.c local.h util.h err.h paramStructs.h 
  1491. ! vemInterface.o : vemInterface.c local.h ../../octtools/include/rpc.h ../../octtools/include/port.h \
  1492. !   ../../octtools/include/oct.h ../../octtools/include/ansi.h ../../octtools/include/list.h \
  1493.     ../../octtools/include/copyright.h ../../octtools/include/region.h err.h octMacros.h 
  1494. ! edit.o : edit.c local.h ../../octtools/include/rpc.h ../../octtools/include/port.h \
  1495. !   ../../octtools/include/oct.h ../../octtools/include/ansi.h ../../octtools/include/list.h \
  1496.     ../../octtools/include/copyright.h ../../octtools/include/region.h ../../octtools/include/oh.h \
  1497.     paramStructs.h vemInterface.h util.h err.h octIfc.h exec.h 
  1498. ! exec.o : exec.c local.h ../../octtools/include/rpc.h ../../octtools/include/port.h \
  1499. !   ../../octtools/include/oct.h ../../octtools/include/ansi.h ../../octtools/include/list.h \
  1500.     ../../octtools/include/copyright.h ../../octtools/include/region.h vemInterface.h \
  1501. !   compile.h octIfc.h ../../octtools/include/oh.h edit.h err.h util.h 
  1502. ! err.o : err.c local.h 
  1503. ! ganttChart.o : ganttChart.c local.h err.h vemInterface.h 
  1504. ! ganttIfc.o : ganttIfc.c local.h ../../octtools/include/rpc.h ../../octtools/include/port.h \
  1505. !   ../../octtools/include/oct.h ../../octtools/include/ansi.h ../../octtools/include/list.h \
  1506.     ../../octtools/include/copyright.h ../../octtools/include/region.h err.h ganttIfc.h \
  1507.     ../../octtools/include/oh.h vemInterface.h 
  1508. ! octIfc.o : octIfc.c local.h ../../octtools/include/rpc.h ../../octtools/include/port.h \
  1509. !   ../../octtools/include/oct.h ../../octtools/include/ansi.h ../../octtools/include/list.h \
  1510.     ../../octtools/include/copyright.h ../../octtools/include/region.h paramStructs.h \
  1511.     err.h util.h octMacros.h mkIcon.h ../../octtools/include/oh.h mkTerm.h 
  1512. ! icon.o : icon.c local.h ../../octtools/include/rpc.h ../../octtools/include/port.h \
  1513. !   ../../octtools/include/oct.h ../../octtools/include/ansi.h ../../octtools/include/list.h \
  1514.     ../../octtools/include/copyright.h ../../octtools/include/region.h util.h err.h \
  1515.     vemInterface.h octMacros.h palette.h main.h 
  1516. ! misc.o : misc.c local.h ../../octtools/include/rpc.h ../../octtools/include/port.h \
  1517. !   ../../octtools/include/oct.h ../../octtools/include/ansi.h ../../octtools/include/list.h \
  1518.     ../../octtools/include/copyright.h ../../octtools/include/region.h vemInterface.h \
  1519.     util.h octIfc.h octMacros.h err.h main.h 
  1520. ! mkTerm.o : mkTerm.c local.h ../../octtools/include/rpc.h ../../octtools/include/port.h \
  1521. !   ../../octtools/include/oct.h ../../octtools/include/ansi.h ../../octtools/include/list.h \
  1522.     ../../octtools/include/copyright.h ../../octtools/include/region.h err.h octMacros.h \
  1523.     ../../octtools/include/oh.h mkTerm.h mkIcon.h 
  1524. ! mkIcon.o : mkIcon.c local.h ../../octtools/include/rpc.h ../../octtools/include/port.h \
  1525. !   ../../octtools/include/oct.h ../../octtools/include/ansi.h ../../octtools/include/list.h \
  1526.     ../../octtools/include/copyright.h ../../octtools/include/region.h err.h mkTerm.h \
  1527.     octIfc.h octMacros.h util.h ../../octtools/include/oh.h vemInterface.h mkIcon.h 
  1528. ! palette.o : palette.c local.h ../../octtools/include/rpc.h ../../octtools/include/port.h \
  1529. !   ../../octtools/include/oct.h ../../octtools/include/ansi.h ../../octtools/include/list.h \
  1530.     ../../octtools/include/copyright.h ../../octtools/include/region.h ../../octtools/include/oh.h \
  1531.     octMacros.h err.h mkIcon.h util.h octIfc.h 
  1532.   xfunctions.o : xfunctions.c 
  1533. ! options.o : options.c local.h ../../octtools/include/rpc.h ../../octtools/include/port.h \
  1534. !   ../../octtools/include/oct.h ../../octtools/include/ansi.h ../../octtools/include/list.h \
  1535.     ../../octtools/include/copyright.h ../../octtools/include/region.h vemInterface.h \
  1536.     edit.h exec.h util.h icon.h misc.h err.h 
  1537.   kernelCalls.o : kernelCalls.cc kernelCalls.h ../../src/kernel/InterpGalaxy.h \
  1538. --- 88,155 ----
  1539.   # Don't add anything after the next line; makedepend will zap it.
  1540.   # DO NOT DELETE THIS LINE -- make depend depends on it.
  1541.   
  1542. ! main.o : main.c local.h ../../octtools/include/ansi.h ../../octtools/include/rpc.h \
  1543. !   ../../octtools/include/port.h ../../octtools/include/oct.h ../../octtools/include/list.h \
  1544.     ../../octtools/include/copyright.h ../../octtools/include/region.h vemInterface.h \
  1545.     compile.h edit.h exec.h util.h icon.h misc.h ganttIfc.h options.h utilities.h \
  1546.     err.h 
  1547. ! util.o : util.c local.h ../../octtools/include/ansi.h err.h util.h ../../octtools/include/rpc.h \
  1548. !   ../../octtools/include/port.h ../../octtools/include/oct.h ../../octtools/include/list.h \
  1549.     ../../octtools/include/copyright.h ../../octtools/include/region.h octIfc.h \
  1550.     vemInterface.h 
  1551.   utilities.o : utilities.c ../../octtools/include/rpc.h ../../octtools/include/port.h \
  1552.     ../../octtools/include/oct.h ../../octtools/include/ansi.h ../../octtools/include/list.h \
  1553.     ../../octtools/include/copyright.h ../../octtools/include/region.h exec.h 
  1554. ! compile.o : compile.c local.h ../../octtools/include/ansi.h ../../octtools/include/rpc.h \
  1555. !   ../../octtools/include/port.h ../../octtools/include/oct.h ../../octtools/include/list.h \
  1556.     ../../octtools/include/copyright.h ../../octtools/include/region.h paramStructs.h \
  1557.     vemInterface.h util.h err.h main.h octIfc.h octMacros.h 
  1558. ! paramStructs.o : paramStructs.c local.h ../../octtools/include/ansi.h util.h \
  1559. !   err.h paramStructs.h 
  1560. ! vemInterface.o : vemInterface.c local.h ../../octtools/include/ansi.h ../../octtools/include/rpc.h \
  1561. !   ../../octtools/include/port.h ../../octtools/include/oct.h ../../octtools/include/list.h \
  1562.     ../../octtools/include/copyright.h ../../octtools/include/region.h err.h octMacros.h 
  1563. ! edit.o : edit.c local.h ../../octtools/include/ansi.h ../../octtools/include/rpc.h \
  1564. !   ../../octtools/include/port.h ../../octtools/include/oct.h ../../octtools/include/list.h \
  1565.     ../../octtools/include/copyright.h ../../octtools/include/region.h ../../octtools/include/oh.h \
  1566.     paramStructs.h vemInterface.h util.h err.h octIfc.h exec.h 
  1567. ! exec.o : exec.c local.h ../../octtools/include/ansi.h ../../octtools/include/rpc.h \
  1568. !   ../../octtools/include/port.h ../../octtools/include/oct.h ../../octtools/include/list.h \
  1569.     ../../octtools/include/copyright.h ../../octtools/include/region.h vemInterface.h \
  1570. !   compile.h octIfc.h ../../octtools/include/oh.h edit.h err.h util.h ganttIfc.h 
  1571. ! err.o : err.c local.h ../../octtools/include/ansi.h 
  1572. ! ganttChart.o : ganttChart.c local.h ../../octtools/include/ansi.h err.h vemInterface.h 
  1573. ! ganttIfc.o : ganttIfc.c local.h ../../octtools/include/ansi.h ../../octtools/include/rpc.h \
  1574. !   ../../octtools/include/port.h ../../octtools/include/oct.h ../../octtools/include/list.h \
  1575.     ../../octtools/include/copyright.h ../../octtools/include/region.h err.h ganttIfc.h \
  1576.     ../../octtools/include/oh.h vemInterface.h 
  1577. ! octIfc.o : octIfc.c local.h ../../octtools/include/ansi.h ../../octtools/include/rpc.h \
  1578. !   ../../octtools/include/port.h ../../octtools/include/oct.h ../../octtools/include/list.h \
  1579.     ../../octtools/include/copyright.h ../../octtools/include/region.h paramStructs.h \
  1580.     err.h util.h octMacros.h mkIcon.h ../../octtools/include/oh.h mkTerm.h 
  1581. ! icon.o : icon.c local.h ../../octtools/include/ansi.h ../../octtools/include/rpc.h \
  1582. !   ../../octtools/include/port.h ../../octtools/include/oct.h ../../octtools/include/list.h \
  1583.     ../../octtools/include/copyright.h ../../octtools/include/region.h util.h err.h \
  1584.     vemInterface.h octMacros.h palette.h main.h 
  1585. ! misc.o : misc.c local.h ../../octtools/include/ansi.h ../../octtools/include/rpc.h \
  1586. !   ../../octtools/include/port.h ../../octtools/include/oct.h ../../octtools/include/list.h \
  1587.     ../../octtools/include/copyright.h ../../octtools/include/region.h vemInterface.h \
  1588.     util.h octIfc.h octMacros.h err.h main.h 
  1589. ! mkTerm.o : mkTerm.c local.h ../../octtools/include/ansi.h ../../octtools/include/rpc.h \
  1590. !   ../../octtools/include/port.h ../../octtools/include/oct.h ../../octtools/include/list.h \
  1591.     ../../octtools/include/copyright.h ../../octtools/include/region.h err.h octMacros.h \
  1592.     ../../octtools/include/oh.h mkTerm.h mkIcon.h 
  1593. ! mkIcon.o : mkIcon.c local.h ../../octtools/include/ansi.h ../../octtools/include/rpc.h \
  1594. !   ../../octtools/include/port.h ../../octtools/include/oct.h ../../octtools/include/list.h \
  1595.     ../../octtools/include/copyright.h ../../octtools/include/region.h err.h mkTerm.h \
  1596.     octIfc.h octMacros.h util.h ../../octtools/include/oh.h vemInterface.h mkIcon.h 
  1597. ! palette.o : palette.c local.h ../../octtools/include/ansi.h ../../octtools/include/rpc.h \
  1598. !   ../../octtools/include/port.h ../../octtools/include/oct.h ../../octtools/include/list.h \
  1599.     ../../octtools/include/copyright.h ../../octtools/include/region.h ../../octtools/include/oh.h \
  1600.     octMacros.h err.h mkIcon.h util.h octIfc.h 
  1601.   xfunctions.o : xfunctions.c 
  1602. ! options.o : options.c local.h ../../octtools/include/ansi.h ../../octtools/include/rpc.h \
  1603. !   ../../octtools/include/port.h ../../octtools/include/oct.h ../../octtools/include/list.h \
  1604.     ../../octtools/include/copyright.h ../../octtools/include/region.h vemInterface.h \
  1605.     edit.h exec.h util.h icon.h misc.h err.h 
  1606.   kernelCalls.o : kernelCalls.cc kernelCalls.h ../../src/kernel/InterpGalaxy.h \
  1607. *** ./src/pigilib/misc.c    Wed Nov 25 21:26:19 1992
  1608. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/pigilib/misc.c    Mon Apr 12 17:50:34 1993
  1609. ***************
  1610. *** 24,36 ****
  1611.   */
  1612.   /* misc.c  edg
  1613.   Version identification:
  1614. ! @(#)misc.c    2.15    11/25/92
  1615.   */
  1616.   
  1617.   /* Includes */
  1618.   #include <stdio.h>
  1619.   #include <strings.h>
  1620. - #include "local.h"
  1621.   #include "rpc.h"
  1622.   #include "vemInterface.h"
  1623.   #include "util.h"
  1624. --- 24,36 ----
  1625.   */
  1626.   /* misc.c  edg
  1627.   Version identification:
  1628. ! @(#)misc.c    2.18    4/7/93
  1629.   */
  1630.   
  1631.   /* Includes */
  1632. + #include "local.h"
  1633.   #include <stdio.h>
  1634.   #include <strings.h>
  1635.   #include "rpc.h"
  1636.   #include "vemInterface.h"
  1637.   #include "util.h"
  1638. ***************
  1639. *** 47,52 ****
  1640. --- 47,53 ----
  1641.   
  1642.   /* uses the ptman script to print it out the man page for the given
  1643.      star or galaxy */
  1644. + boolean
  1645.   ManPage(starName)
  1646.   char *starName;
  1647.   {
  1648. ***************
  1649. *** 128,133 ****
  1650. --- 129,139 ----
  1651.       ViDone();
  1652.   }
  1653.   
  1654. + /***********************************************************************
  1655. + PrintFacet(): calls "prfacet" utility to save PostScript to printer
  1656. + or file.
  1657. + ***********************************************************************/
  1658.   int
  1659.   PrintFacet(spot, cmdList, userOptionWord) /* ARGSUSED */
  1660.   RPCSpot *spot;
  1661. ***************
  1662. *** 134,168 ****
  1663.   lsList cmdList;
  1664.   long userOptionWord;
  1665.   {
  1666. !     static dmTextItem item = {"Options (e.g. -p -b 3x3):", 1, 40, "-x -X", NULL};
  1667. !     char buf[512];
  1668. !     octObject facet;
  1669. !     char* fullName;
  1670.   
  1671. !     ViInit("print facet");
  1672. !     ErrClear();
  1673.   
  1674. !     facet.objectId = spot->facet;
  1675. !     if (octGetById(&facet) != OCT_OK) {
  1676. !         PrintErr(octErrorString());
  1677. !         ViDone();
  1678. !     }
  1679. !     octFullName(&facet,&fullName);
  1680.   
  1681. !     if (dmMultiText("print facet (PRINTER variable must be set)", 1, &item) != VEM_OK) {
  1682. !         PrintCon("Aborted entry");
  1683. !         ViDone();
  1684. !     }
  1685. !     sprintf(buf, "prfacet %s %s", item.value, fullName);
  1686. !     PrintDebug(buf);
  1687. !     if (util_csystem(buf)) {
  1688. !         sprintf(buf, "Error invoking prfacet utility.");
  1689. !     PrintErr(buf);
  1690. !     }
  1691. !     ViDone();
  1692. ! }
  1693.   
  1694.   
  1695.   int
  1696.   ERFilterDesign(spot, cmdList, userOptionWord) /* ARGSUSED */
  1697.   RPCSpot *spot;
  1698. --- 140,202 ----
  1699.   lsList cmdList;
  1700.   long userOptionWord;
  1701.   {
  1702. !     static dmTextItem items[] = {
  1703. !         {"oct2ps options:", 1, 40, "-x -X -b 3x3", NULL},
  1704. !         {"(P)rint or to (F)ile:", 1, 40, "P", NULL},
  1705. !         {"file name:", 1, 40, "", NULL}
  1706. !     };
  1707. ! #define ITEMS_N sizeof(items) / sizeof(dmTextItem)
  1708.   
  1709. !     char buf[512];
  1710. !     octObject facet;
  1711. !     char* fullName;
  1712. !     char fileName[128];
  1713.   
  1714. ! /** Begin here. **/
  1715. !     ViInit("print facet");
  1716. !     ErrClear();
  1717.   
  1718. ! /** Get facet information. **/
  1719. !     facet.objectId = spot->facet;
  1720. !     if (octGetById(&facet) != OCT_OK) {
  1721. !         PrintErr(octErrorString());
  1722. !         ViDone();
  1723. !     }
  1724. !     octFullName(&facet, &fullName);
  1725.   
  1726. + /** Display dialog box. **/
  1727. +     if (dmMultiText("print facet (PRINTER variable must be set)",
  1728. +             ITEMS_N, items) != VEM_OK) {
  1729. +         PrintCon("Aborted entry");
  1730. +         ViDone();
  1731. +     }
  1732.   
  1733. + /** Error-check the user input. **/
  1734. +     if ((items[1].value[0] == 'f') || (items[1].value[0] == 'F')) {
  1735. +         fileName[0] = '\000'; /* Clear previous value. */
  1736. +         sscanf(items[2].value, "%s", fileName); /* Get first word. */
  1737. +         if (!fileName[0]) {
  1738. +             PrintErr("print-facet needs a filename");
  1739. +             ViDone();
  1740. +         }
  1741. +         sprintf(buf, "prfacet -TOFILE %s %s %s", fileName,
  1742. +                 items[0].value, fullName);
  1743. +     } else {
  1744. +         sprintf(buf, "prfacet %s %s", items[0].value, fullName);
  1745. +     }
  1746. + /** Call the prfacet command. **/
  1747. +     PrintDebug(buf);
  1748. +     if (util_csystem(buf)) {
  1749. +         sprintf(buf, "Error invoking prfacet utility.");
  1750. +         PrintErr(buf);
  1751. +     }
  1752. +     ViDone();
  1753. + #undef ITEMS_N
  1754. + } /* end PrintFacet() */
  1755.   int
  1756.   ERFilterDesign(spot, cmdList, userOptionWord) /* ARGSUSED */
  1757.   RPCSpot *spot;
  1758. ***************
  1759. *** 254,259 ****
  1760. --- 288,295 ----
  1761.       ViDone();
  1762.   }
  1763.   
  1764. + static void AdjustScalePan();
  1765.   /* 6/27/89 = tries to open facet read-only first */
  1766.   int 
  1767.   RpcOpenFacet(spot, cmdList, userOptionWord) /* ARGSUSED */
  1768. ***************
  1769. *** 272,278 ****
  1770.       RPCArg *theArg;
  1771.       Window newWindow;  /* the vem window looking at facet */
  1772.       octBox bbox;  /*  an argument to octBB, return value not used */
  1773. !     void AdjustScalePan(); /* this function is right after RpcOpenFacet */
  1774.   
  1775.       ViInit("open-facet");
  1776.       ErrClear();
  1777. --- 308,314 ----
  1778.       RPCArg *theArg;
  1779.       Window newWindow;  /* the vem window looking at facet */
  1780.       octBox bbox;  /*  an argument to octBB, return value not used */
  1781.   
  1782.       ViInit("open-facet");
  1783.       ErrClear();
  1784. *** ./src/pigilib/mkIcon.c    Wed Nov 25 21:26:26 1992
  1785. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/pigilib/mkIcon.c    Mon Apr 12 17:50:35 1993
  1786. ***************
  1787. *** 1,6 ****
  1788.   /* mkIcon.c  edg
  1789.   Version identification:
  1790. ! @(#)mkIcon.c    1.15    11/25/92
  1791.   */
  1792.   
  1793.   /*
  1794. --- 1,6 ----
  1795.   /* mkIcon.c  edg
  1796.   Version identification:
  1797. ! @(#)mkIcon.c    1.16    1/19/93
  1798.   */
  1799.   
  1800.   /*
  1801. ***************
  1802. *** 29,37 ****
  1803.   */
  1804.   
  1805.   /* Includes */
  1806.   #include <stdio.h>
  1807.   #include <sys/file.h>
  1808. - #include "local.h"
  1809.   #include "rpc.h"
  1810.   #include "err.h"
  1811.   #include "mkTerm.h"
  1812. --- 29,37 ----
  1813.   */
  1814.   
  1815.   /* Includes */
  1816. + #include "local.h"
  1817.   #include <stdio.h>
  1818.   #include <sys/file.h>
  1819.   #include "rpc.h"
  1820.   #include "err.h"
  1821.   #include "mkTerm.h"
  1822. ***************
  1823. *** 45,51 ****
  1824.   
  1825.   #define ERRBUF_MAX 1000
  1826.   
  1827. ! static octObject starBoxLayer, galBoxLayer, iconBackgrLayer, iconShadowLayer;
  1828.   
  1829.   /* 8/24/89
  1830.   Check to see if icon already exists.
  1831. --- 45,51 ----
  1832.   
  1833.   #define ERRBUF_MAX 1000
  1834.   
  1835. ! static octObject starBoxLayer, galBoxLayer, iconBackgrLayer;
  1836.   
  1837.   /* 8/24/89
  1838.   Check to see if icon already exists.
  1839. ***************
  1840. *** 134,140 ****
  1841.   IconType type;
  1842.   {
  1843.       octObject srcFacet;
  1844. !     char buf[FILENAME_MAX];
  1845.       char *techDir;
  1846.   
  1847.       srcFacet.type = OCT_FACET;
  1848. --- 134,140 ----
  1849.   IconType type;
  1850.   {
  1851.       octObject srcFacet;
  1852. !     char buf[MAXPATHLEN];
  1853.       char *techDir;
  1854.   
  1855.       srcFacet.type = OCT_FACET;
  1856. ***************
  1857. *** 216,244 ****
  1858.   }
  1859.   
  1860.   static boolean
  1861. - MkShadow(layerPtr, size)
  1862. - octObject *layerPtr;
  1863. - int size;
  1864. - {
  1865. -     Shape box;
  1866. -     struct octPoint corners[2];
  1867. -     static struct octPoint noTranslate = {0, 0};
  1868. -     octObject dummy;
  1869. -     box.type = OCT_BOX;
  1870. -     box.points = corners;
  1871. -     box.points_n = 2;
  1872. -     corners[0].x = -60;
  1873. -     corners[0].y = 40;
  1874. -     corners[1].x = 40;
  1875. -     corners[1].y = 40-size*25;
  1876. -     ERR_IF1(!PutShape(layerPtr, &dummy, &box, &noTranslate));
  1877. -     return TRUE;
  1878. - }
  1879. - static boolean
  1880.   MkLabel(facetPtr, name)
  1881.   octObject *facetPtr;
  1882.   char *name;
  1883. --- 216,221 ----
  1884. ***************
  1885. *** 380,391 ****
  1886.       if (ohGetOrCreateLayer(iconFacetPtr, &iconBackgrLayer, "iconBackground")
  1887.       == OCT_OK) {
  1888.       ERR_IF1(!MkBox(&iconBackgrLayer, size));
  1889. - /* Not making shadows for galaxies
  1890. -     if (ohGetOrCreateLayer(iconFacetPtr, &iconShadowLayer, "iconShadow")
  1891. -         == OCT_OK) {
  1892. -         ERR_IF1(!MkShadow(&iconShadowLayer, size));
  1893. -     }
  1894. - */
  1895.       }
  1896.       CK_OCT(ohCreateOrModifyPropStr(iconFacetPtr, &prop, "galaxy", ""));
  1897.       CK_OCT(octFlushFacet(iconFacetPtr));
  1898. --- 357,362 ----
  1899. *** ./src/pigilib/mkTerm.c    Wed Nov 25 21:26:31 1992
  1900. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/pigilib/mkTerm.c    Mon Apr 12 17:50:35 1993
  1901. ***************
  1902. *** 1,6 ****
  1903.   /* mkTerm.c  edg
  1904.   Version identification:
  1905. ! @(#)mkTerm.c    1.9    11/25/92
  1906.   Functions that create terminals and thier symbols in a icon facet.
  1907.   Functions here use err.c for error handling.
  1908.   */
  1909. --- 1,6 ----
  1910.   /* mkTerm.c  edg
  1911.   Version identification:
  1912. ! @(#)mkTerm.c    1.10    1/19/93
  1913.   Functions that create terminals and thier symbols in a icon facet.
  1914.   Functions here use err.c for error handling.
  1915.   */
  1916. ***************
  1917. *** 31,38 ****
  1918.   */
  1919.   
  1920.   /* Includes */
  1921. - #include <stdio.h>
  1922.   #include "local.h"
  1923.   #include "rpc.h"
  1924.   #include "err.h"
  1925.   #include "octMacros.h"
  1926. --- 31,38 ----
  1927.   */
  1928.   
  1929.   /* Includes */
  1930.   #include "local.h"
  1931. + #include <stdio.h>
  1932.   #include "rpc.h"
  1933.   #include "err.h"
  1934.   #include "octMacros.h"
  1935. *** ./src/pigilib/octIfc.c    Wed Nov 25 21:26:38 1992
  1936. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/pigilib/octIfc.c    Mon Apr 12 17:50:36 1993
  1937. ***************
  1938. *** 24,38 ****
  1939.   */
  1940.   /*  octIfc.c  edg
  1941.   Version identification:
  1942. ! @(#)octIfc.c    1.22    11/25/92
  1943.   Useful higher level OCT interface functions.
  1944.   */
  1945.   
  1946.   /* Includes */
  1947.   #include <stdio.h>
  1948.   #include <strings.h>
  1949.   #include <ctype.h>
  1950. - #include "local.h"
  1951.   #include "rpc.h"
  1952.   #include "paramStructs.h"
  1953.   #include "err.h"
  1954. --- 24,38 ----
  1955.   */
  1956.   /*  octIfc.c  edg
  1957.   Version identification:
  1958. ! @(#)octIfc.c    1.23    1/19/93
  1959.   Useful higher level OCT interface functions.
  1960.   */
  1961.   
  1962.   /* Includes */
  1963. + #include "local.h"
  1964.   #include <stdio.h>
  1965.   #include <strings.h>
  1966.   #include <ctype.h>
  1967.   #include "rpc.h"
  1968.   #include "paramStructs.h"
  1969.   #include "err.h"
  1970. ***************
  1971. *** 44,49 ****
  1972. --- 44,51 ----
  1973.   #include "oct.h"
  1974.   #include "mkTerm.h"
  1975.   
  1976. + static boolean SetParamProp();
  1977.   /* 8/14/89
  1978.   Opens the master of an instance, but allows you to choose which facet.
  1979.   */
  1980. ***************
  1981. *** 282,287 ****
  1982. --- 284,290 ----
  1983.       return SetParamProp(instPtr,pListPtr,"params");
  1984.   }
  1985.   
  1986. + boolean
  1987.   SetTargetParams(instPtr, pListPtr)
  1988.   octObject *instPtr;
  1989.   ParamListType *pListPtr;
  1990. ***************
  1991. *** 533,538 ****
  1992. --- 536,542 ----
  1993.   /* get delay, buswidth, or some other property as a string using
  1994.    * Stringize -- empty string and return of false if not set.
  1995.    */
  1996. + boolean
  1997.   GetStringizedProp(objPtr, name, dest, dlen)
  1998.   octObject *objPtr;
  1999.   char *name, *dest;
  2000. *** ./src/pigilib/options.c    Wed Nov 25 21:26:45 1992
  2001. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/pigilib/options.c    Mon Apr 12 17:50:37 1993
  2002. ***************
  2003. *** 24,35 ****
  2004.   */
  2005.   /*  options.c  edg
  2006.   Version identification:
  2007. ! @(#)options.c    1.4    11/25/92
  2008.   */
  2009.   
  2010.   /* Includes */
  2011. - #include <stdio.h>
  2012.   #include "local.h"
  2013.   #include "rpc.h"
  2014.   #include "vemInterface.h"
  2015.   #include "edit.h"
  2016. --- 24,35 ----
  2017.   */
  2018.   /*  options.c  edg
  2019.   Version identification:
  2020. ! @(#)options.c    1.5    1/19/93
  2021.   */
  2022.   
  2023.   /* Includes */
  2024.   #include "local.h"
  2025. + #include <stdio.h>
  2026.   #include "rpc.h"
  2027.   #include "vemInterface.h"
  2028.   #include "edit.h"
  2029. *** ./src/pigilib/palette.c    Wed Nov 25 21:26:50 1992
  2030. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/pigilib/palette.c    Mon Apr 12 17:50:37 1993
  2031. ***************
  2032. *** 1,6 ****
  2033.   /* palette.c  edg
  2034.   Version identification:
  2035. ! @(#)palette.c    1.5    11/25/92
  2036.   Make palette of icons.
  2037.   These routines should be in octIfc.c maybe, since it enforces policy.
  2038.   */
  2039. --- 1,6 ----
  2040.   /* palette.c  edg
  2041.   Version identification:
  2042. ! @(#)palette.c    1.6    1/19/93
  2043.   Make palette of icons.
  2044.   These routines should be in octIfc.c maybe, since it enforces policy.
  2045.   */
  2046. ***************
  2047. *** 31,38 ****
  2048.   */
  2049.   
  2050.   /* Includes */
  2051. - #include <stdio.h>
  2052.   #include "local.h"
  2053.   #include "rpc.h"
  2054.   #include "oh.h"
  2055.   #include "octMacros.h"
  2056. --- 31,38 ----
  2057.   */
  2058.   
  2059.   /* Includes */
  2060.   #include "local.h"
  2061. + #include <stdio.h>
  2062.   #include "rpc.h"
  2063.   #include "oh.h"
  2064.   #include "octMacros.h"
  2065. ***************
  2066. *** 115,122 ****
  2067.   
  2068.       octGenerator genInst;
  2069.       struct octPoint cursorPt;
  2070. !     octObject bb;
  2071. !     char *techDir, buf[FILENAME_MAX], *cell;
  2072.   
  2073.       octInitGenContents(palFacetPtr, OCT_INSTANCE_MASK, &genInst);
  2074.       while (octGenerate(&genInst, cursorPtr) == OCT_OK) {
  2075. --- 115,122 ----
  2076.   
  2077.       octGenerator genInst;
  2078.       struct octPoint cursorPt;
  2079. !     octBox bb;
  2080. !     char *techDir, buf[MAXPATHLEN], *cell;
  2081.   
  2082.       octInitGenContents(palFacetPtr, OCT_INSTANCE_MASK, &genInst);
  2083.       while (octGenerate(&genInst, cursorPtr) == OCT_OK) {
  2084. ***************
  2085. *** 135,142 ****
  2086.       /* Locates cursor at an even (100 octUnits) point below the
  2087.           lowerLeft corner of current bounding box.
  2088.       */
  2089. !     cursorPt.x = AlignFunction(bb.contents.box.lowerLeft.x + 50);
  2090. !     cursorPt.y = -AlignFunction(-bb.contents.box.lowerLeft.y + 75);
  2091.       } else {
  2092.       cursorPt = defaultCursorPt;
  2093.       }
  2094. --- 135,142 ----
  2095.       /* Locates cursor at an even (100 octUnits) point below the
  2096.           lowerLeft corner of current bounding box.
  2097.       */
  2098. !     cursorPt.x = AlignFunction(bb.lowerLeft.x + 50);
  2099. !     cursorPt.y = -AlignFunction(-bb.lowerLeft.y + 75);
  2100.       } else {
  2101.       cursorPt = defaultCursorPt;
  2102.       }
  2103. *** ./src/pigilib/paramStructs.c    Wed Nov 25 21:26:55 1992
  2104. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/pigilib/paramStructs.c    Mon Apr 12 17:50:37 1993
  2105. ***************
  2106. *** 24,30 ****
  2107.   */
  2108.   /* paramStructs.c  edg
  2109.   Version identification:
  2110. ! @(#)paramStructs.c    1.6    11/25/92
  2111.   This file contains functions that manage param data structures.
  2112.   ParamList and param string conversion functions.
  2113.   Caveats: Need to be able to free allocated memory in ParamListType.
  2114. --- 24,30 ----
  2115.   */
  2116.   /* paramStructs.c  edg
  2117.   Version identification:
  2118. ! @(#)paramStructs.c    1.7    1/19/93
  2119.   This file contains functions that manage param data structures.
  2120.   ParamList and param string conversion functions.
  2121.   Caveats: Need to be able to free allocated memory in ParamListType.
  2122. ***************
  2123. *** 35,43 ****
  2124.   
  2125.   
  2126.   /* Includes */
  2127.   #include <stdio.h>
  2128.   #include <strings.h>
  2129. - #include "local.h"
  2130.   #include "util.h"
  2131.   #include "err.h"
  2132.   #include "paramStructs.h"
  2133. --- 35,43 ----
  2134.   
  2135.   
  2136.   /* Includes */
  2137. + #include "local.h"
  2138.   #include <stdio.h>
  2139.   #include <strings.h>
  2140.   #include "util.h"
  2141.   #include "err.h"
  2142.   #include "paramStructs.h"
  2143. *** ./src/pigilib/util.c    Wed Nov 25 21:27:01 1992
  2144. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/pigilib/util.c    Mon Apr 12 17:50:38 1993
  2145. ***************
  2146. *** 24,39 ****
  2147.   */
  2148.   /* util.c  edg
  2149.   Version identification:
  2150. ! @(#)util.c    1.9    11/25/92
  2151.   Utility functions.
  2152.   */
  2153.   
  2154.   /* Includes */
  2155.   #include <stdio.h>
  2156.   #include <strings.h>
  2157.   #include <pwd.h>
  2158.   #include <search.h>
  2159. - #include "local.h"
  2160.   #include "err.h"
  2161.   #include "util.h"
  2162.   #include "rpc.h"
  2163. --- 24,39 ----
  2164.   */
  2165.   /* util.c  edg
  2166.   Version identification:
  2167. ! @(#)util.c    1.10    1/19/93
  2168.   Utility functions.
  2169.   */
  2170.   
  2171.   /* Includes */
  2172. + #include "local.h"
  2173.   #include <stdio.h>
  2174.   #include <strings.h>
  2175.   #include <pwd.h>
  2176.   #include <search.h>
  2177.   #include "err.h"
  2178.   #include "util.h"
  2179.   #include "rpc.h"
  2180. ***************
  2181. *** 55,62 ****
  2182.   char **outPtr;
  2183.   int bytes;
  2184.   {
  2185. -     extern char *malloc();
  2186.       ERR_IF2((*outPtr = (char *) malloc(bytes)) == NULL, 
  2187.       "UMalloc: malloc() failed");
  2188.       return(TRUE);
  2189. --- 55,60 ----
  2190. ***************
  2191. *** 75,82 ****
  2192.   StrDup(outPtr, in)
  2193.   char **outPtr, *in;
  2194.   {
  2195. -     extern char *malloc();
  2196.       ERR_IF2((*outPtr = (char *) malloc(strlen(in) + 1)) == NULL, 
  2197.       "StrDup: malloc() failed");
  2198.       (void) strcpy(*outPtr, in);
  2199. --- 73,78 ----
  2200. ***************
  2201. *** 94,99 ****
  2202. --- 90,96 ----
  2203.       return(strcpy((char *) calloc(strlen(string)+1, sizeof(char)), string));
  2204.   }
  2205.   
  2206. + extern char* KcExpandPathName();
  2207.   
  2208.   /*
  2209.   Use the ptolemy kernel expansion call -- kennard
  2210. ***************
  2211. *** 275,280 ****
  2212. --- 272,278 ----
  2213.   DupSheet *ds;
  2214.   {
  2215.       *ds = NULL;
  2216. +     return TRUE;
  2217.   }
  2218.   
  2219.   boolean
  2220. *** ./src/pigilib/vemInterface.c    Wed Nov 25 21:27:15 1992
  2221. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/pigilib/vemInterface.c    Mon Apr 12 17:50:39 1993
  2222. ***************
  2223. *** 24,37 ****
  2224.   */
  2225.   /* vemInterface.c  edg
  2226.   Version identification:
  2227. ! @(#)vemInterface.c    1.8    11/25/92
  2228.   Functions that interface C to VEM
  2229.   Note: all print functions append \n to string before printing.
  2230.   */
  2231.   
  2232.   /* Includes */
  2233. - #include <stdio.h>
  2234.   #include "local.h"
  2235.   #include "rpc.h"
  2236.   #include "err.h"
  2237.   #include "octMacros.h"
  2238. --- 24,37 ----
  2239.   */
  2240.   /* vemInterface.c  edg
  2241.   Version identification:
  2242. ! @(#)vemInterface.c    1.9    1/19/93
  2243.   Functions that interface C to VEM
  2244.   Note: all print functions append \n to string before printing.
  2245.   */
  2246.   
  2247.   /* Includes */
  2248.   #include "local.h"
  2249. + #include <stdio.h>
  2250.   #include "rpc.h"
  2251.   #include "err.h"
  2252.   #include "octMacros.h"
  2253. *** ./src/libgantt/draw.c    Wed Nov 25 20:46:54 1992
  2254. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/libgantt/draw.c    Mon Apr 12 17:51:16 1993
  2255. ***************
  2256. *** 1,6 ****
  2257.   /**************************************************************************
  2258.   Version identification:
  2259. ! @(#)draw.c    2.3    11/25/92
  2260.   
  2261.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  2262.   All rights reserved.
  2263. --- 1,6 ----
  2264.   /**************************************************************************
  2265.   Version identification:
  2266. ! @(#)draw.c    2.4    1/19/93
  2267.   
  2268.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  2269.   All rights reserved.
  2270. ***************
  2271. *** 31,37 ****
  2272.   
  2273.   **************************************************************************/
  2274.   #ifndef lint
  2275. ! static char sccsid[] = "@(#)draw.c    2.3    11/25/92";
  2276.   #endif /* not lint */
  2277.   
  2278.   #include <stdio.h>
  2279. --- 31,37 ----
  2280.   
  2281.   **************************************************************************/
  2282.   #ifndef lint
  2283. ! static char sccsid[] = "@(#)draw.c    2.4    1/19/93";
  2284.   #endif /* not lint */
  2285.   
  2286.   #include <stdio.h>
  2287. ***************
  2288. *** 270,275 ****
  2289. --- 270,276 ----
  2290.   register int proc;
  2291.   {
  2292.       register struct star *star;
  2293. +     extern GC w_gc_box;
  2294.   
  2295.       current_gc = w_gc_box;
  2296.       if (depth>1)
  2297. ***************
  2298. *** 373,379 ****
  2299.       extern XFontStruct *w_prompt_fontinfo,
  2300.           *w_100plus_fontinfo,
  2301.           *w_stat_fontinfo;
  2302. !     extern GC w_gc_100plus, w_gc_prompt;
  2303.   
  2304.   
  2305.       XClearWindow(display, w);
  2306. --- 374,380 ----
  2307.       extern XFontStruct *w_prompt_fontinfo,
  2308.           *w_100plus_fontinfo,
  2309.           *w_stat_fontinfo;
  2310. !     extern GC w_gc_100plus, w_gc_prompt, w_gc_stat;
  2311.   
  2312.   
  2313.       XClearWindow(display, w);
  2314. *** ./src/libgantt/read_sched.c    Wed Nov 25 20:47:16 1992
  2315. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/libgantt/read_sched.c    Mon Apr 12 17:51:17 1993
  2316. ***************
  2317. *** 1,6 ****
  2318.   /**************************************************************************
  2319.   Version identification:
  2320. ! @(#)read_sched.c    2.3    11/25/92
  2321.   
  2322.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  2323.   All rights reserved.
  2324. --- 1,6 ----
  2325.   /**************************************************************************
  2326.   Version identification:
  2327. ! @(#)read_sched.c    2.4    1/22/93
  2328.   
  2329.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  2330.   All rights reserved.
  2331. ***************
  2332. *** 31,37 ****
  2333.   
  2334.   **************************************************************************/
  2335.   #ifndef lint
  2336. ! static char sccsid[] = "@(#)read_sched.c    2.3    11/25/92";
  2337.   #endif /* not lint */
  2338.   
  2339.   #include <stdio.h>
  2340. --- 31,37 ----
  2341.   
  2342.   **************************************************************************/
  2343.   #ifndef lint
  2344. ! static char sccsid[] = "@(#)read_sched.c    2.4    1/22/93";
  2345.   #endif /* not lint */
  2346.   
  2347.   #include <stdio.h>
  2348. ***************
  2349. *** 88,98 ****
  2350.         star_list_head = new_star; \
  2351.         no_nodes++
  2352.   
  2353.   
  2354.   #define read_stat(name,type,var,msg) \
  2355.   if (fscanf(inp,"%s",buff)!=1) read_err(msg); \
  2356.   if (strcmp(buff,name)!=0) read_err(msg); \
  2357. ! if (fscanf(inp,"%type",&var)!=1) read_err(msg)
  2358.   
  2359.   
  2360.   
  2361. --- 88,103 ----
  2362.         star_list_head = new_star; \
  2363.         no_nodes++
  2364.   
  2365. + /* name is string to look for
  2366. +    type is a format string to read one value, e.g. "%d"
  2367. +    var is a variable to read into
  2368. +    msg is an error message.
  2369. +  */
  2370.   
  2371.   #define read_stat(name,type,var,msg) \
  2372.   if (fscanf(inp,"%s",buff)!=1) read_err(msg); \
  2373.   if (strcmp(buff,name)!=0) read_err(msg); \
  2374. ! if (fscanf(inp,type,&var)!=1) read_err(msg)
  2375.   
  2376.   
  2377.   
  2378. ***************
  2379. *** 143,149 ****
  2380.   
  2381.       /* read number of processors */
  2382.   
  2383. !     read_stat("no_processors",d,no_procs,"displaysched: couldn't read number of processors");
  2384.   #if DEBUG
  2385.       printf("Number of processors read by read_sched = %d\n", no_procs);
  2386.   #endif
  2387. --- 148,155 ----
  2388.   
  2389.       /* read number of processors */
  2390.   
  2391. !     read_stat("no_processors","%d",no_procs,
  2392. !           "displaysched: couldn't read number of processors");
  2393.   #if DEBUG
  2394.       printf("Number of processors read by read_sched = %d\n", no_procs);
  2395.   #endif
  2396. ***************
  2397. *** 151,157 ****
  2398.   
  2399.       /* read the maximum end time (period of the schedule) */
  2400.   
  2401. !     read_stat("period",d,max_end_time,"displaysched: couldn't read schedule period");
  2402.       if (max_end_time <= 0) read_err("displaysched: Bad schedule period\n");
  2403.   
  2404.       /* allocate processor table */
  2405. --- 157,164 ----
  2406.   
  2407.       /* read the maximum end time (period of the schedule) */
  2408.   
  2409. !     read_stat("period","%d",max_end_time,
  2410. !           "displaysched: couldn't read schedule period");
  2411.       if (max_end_time <= 0) read_err("displaysched: Bad schedule period\n");
  2412.   
  2413.       /* allocate processor table */
  2414. ***************
  2415. *** 255,264 ****
  2416.   
  2417.       /* read in the summary statistics of the schedule */
  2418.   
  2419. !     read_stat("min",d,min,"displaysched: could not read MIN");
  2420. !     read_stat("percentage",lf,percentage,"displaysched: could not read PERCENTAGE");
  2421. !     read_stat("optimum",lf,optimum,"displaysched: could not read OPTIMUM");
  2422. !     read_stat("runtime",d,runtime,"displaysched: could not read RUNTIME");
  2423.   
  2424.       /* try to open the display */
  2425.   
  2426. --- 262,274 ----
  2427.   
  2428.       /* read in the summary statistics of the schedule */
  2429.   
  2430. !     read_stat("min","%d",min,"displaysched: could not read MIN");
  2431. !     read_stat("percentage","%lf",percentage,
  2432. !           "displaysched: could not read PERCENTAGE");
  2433. !     read_stat("optimum","%lf",optimum,
  2434. !           "displaysched: could not read OPTIMUM");
  2435. !     read_stat("runtime","%d",runtime,
  2436. !           "displaysched: could not read RUNTIME");
  2437.   
  2438.       /* try to open the display */
  2439.   
  2440. *** ./src/pigiRpc/makefile    Sat Dec 12 11:30:42 1992
  2441. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/pigiRpc/makefile    Mon Apr 12 11:37:54 1993
  2442. ***************
  2443. *** 42,48 ****
  2444.   LIBFILES = $(STAR_LIBFILES) \
  2445.       $(LIBDIR)/libpigi.a $(LIBDIR)/libptolemy.a $(LIBDIR)/libgantt.a
  2446.   
  2447. ! VERSION=0.4
  2448.   
  2449.   ALLSTARS = $(SDFSTARS) $(CGCSTARS) $(CG96STARS) $(CG56STARS) $(CGSTARS) \
  2450.       $(DDFSTARS) $(CGDDFSTARS) $(THORSTARS) $(DESTARS)
  2451. --- 42,48 ----
  2452.   LIBFILES = $(STAR_LIBFILES) \
  2453.       $(LIBDIR)/libpigi.a $(LIBDIR)/libptolemy.a $(LIBDIR)/libgantt.a
  2454.   
  2455. ! VERSION=0.4.1
  2456.   
  2457.   ALLSTARS = $(SDFSTARS) $(CGCSTARS) $(CG96STARS) $(CG56STARS) $(CGSTARS) \
  2458.       $(DDFSTARS) $(CGDDFSTARS) $(THORSTARS) $(DESTARS)
  2459. *** ./src/ptlang/makefile    Tue Nov 24 12:48:38 1992
  2460. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/ptlang/makefile    Wed Apr 14 13:44:20 1993
  2461. ***************
  2462. *** 1,6 ****
  2463.   # Makefile for ptolemy language processor
  2464.   # Version identification:
  2465. ! # @(#)makefile    2.8    11/24/92
  2466.   # Copyright (c) 1990 The Regents of the University of California.
  2467.   #                       All Rights Reserved.
  2468.   
  2469. --- 1,6 ----
  2470.   # Makefile for ptolemy language processor
  2471.   # Version identification:
  2472. ! # @(#)makefile    2.9    4/14/93
  2473.   # Copyright (c) 1990 The Regents of the University of California.
  2474.   #                       All Rights Reserved.
  2475.   
  2476. ***************
  2477. *** 16,22 ****
  2478.   
  2479.   ptlang:    ptlang.o
  2480.       rm -f ptlang
  2481. !     cc ptlang.o -o ptlang
  2482.   
  2483.   ptlang.o:    ptlang.c
  2484.   
  2485. --- 16,22 ----
  2486.   
  2487.   ptlang:    ptlang.o
  2488.       rm -f ptlang
  2489. !     $(CC) ptlang.o -o ptlang
  2490.   
  2491.   ptlang.o:    ptlang.c
  2492.   
  2493. *** ./src/domains/sdf/kernel/SDFWormhole.h    Wed Nov 25 20:49:59 1992
  2494. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/domains/sdf/kernel/SDFWormhole.h    Mon Apr 12 17:51:42 1993
  2495. ***************
  2496. *** 12,18 ****
  2497.   
  2498.   /*******************************************************************
  2499.    SCCS Version identification :
  2500. !  @(#)SDFWormhole.h    2.11        11/25/92
  2501.   
  2502.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  2503.   All rights reserved.
  2504. --- 12,18 ----
  2505.   
  2506.   /*******************************************************************
  2507.    SCCS Version identification :
  2508. !  @(#)SDFWormhole.h    2.12        3/16/93
  2509.   
  2510.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  2511.   All rights reserved.
  2512. ***************
  2513. *** 78,86 ****
  2514.       // return my scheduler
  2515.       Scheduler* scheduler() const { return target->scheduler();}
  2516.   
  2517. !     // print methods
  2518. !     StringList printVerbose() const;
  2519. !     StringList printRecursive() const;
  2520.   
  2521.       // clone -- allows interpreter/pigi to make copies
  2522.       Block* clone() const;
  2523. --- 78,85 ----
  2524.       // return my scheduler
  2525.       Scheduler* scheduler() const { return target->scheduler();}
  2526.   
  2527. !     // print method
  2528. !     StringList print(int verbose) const { return Wormhole::print(verbose);}
  2529.   
  2530.       // clone -- allows interpreter/pigi to make copies
  2531.       Block* clone() const;
  2532. *** ./src/domains/sdf/kernel/SDFWormhole.cc    Wed Nov 25 20:49:29 1992
  2533. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/domains/sdf/kernel/SDFWormhole.cc    Mon Apr 12 17:51:42 1993
  2534. ***************
  2535. *** 1,7 ****
  2536.   static const char file_id[] = "SDFWormhole.cc";
  2537.   /******************************************************************
  2538.   Version identification:
  2539. !  @(#)SDFWormhole.cc    2.12        11/25/92
  2540.   
  2541.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  2542.   All rights reserved.
  2543. --- 1,7 ----
  2544.   static const char file_id[] = "SDFWormhole.cc";
  2545.   /******************************************************************
  2546.   Version identification:
  2547. !  @(#)SDFWormhole.cc    2.13    3/16/93
  2548.   
  2549.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  2550.   All rights reserved.
  2551. ***************
  2552. *** 93,107 ****
  2553.   {
  2554.       buildEventHorizons ();
  2555.   }
  2556. - StringList SDFWormhole :: printVerbose() const {
  2557. -     return Wormhole :: print(0);
  2558. - }
  2559. - StringList SDFWormhole :: printRecursive() const {
  2560. -     return Wormhole :: print(1);
  2561. - }
  2562.   
  2563.   // cloner -- clone the inside and make a new wormhole from that.
  2564.   Block* SDFWormhole :: clone() const {
  2565. --- 93,98 ----
  2566. *** ./src/domains/sdf/kernel/SDFCluster.h    Mon Nov 30 19:33:17 1992
  2567. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/domains/sdf/kernel/SDFCluster.h    Tue Apr 13 11:11:16 1993
  2568. ***************
  2569. *** 3,9 ****
  2570.   
  2571.   /**************************************************************************
  2572.   Version identification:
  2573. ! @(#)SDFCluster.h    1.19    11/30/92
  2574.   
  2575.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  2576.   All rights reserved.
  2577. --- 3,9 ----
  2578.   
  2579.   /**************************************************************************
  2580.   Version identification:
  2581. ! @(#)SDFCluster.h    1.20    1/18/93
  2582.   
  2583.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  2584.   All rights reserved.
  2585. ***************
  2586. *** 162,167 ****
  2587. --- 162,170 ----
  2588.       // generate code using target methods
  2589.       virtual void genCode(Target&, int depth) = 0;
  2590.   
  2591. +     // hook for doing simulated execution of the real stars.
  2592. +     virtual void simRunRealStars() = 0;
  2593.       // run/go
  2594.       int run() = 0;
  2595.       void go() { run();}
  2596. ***************
  2597. *** 214,222 ****
  2598.   
  2599.       // optionally do additional clustering on internal cluster
  2600.       virtual int internalClustering() { return FALSE;}
  2601. -     // hook for doing simulated execution of the real stars.
  2602. -     virtual void simRunRealStars() = 0;
  2603.   
  2604.       // print me
  2605.       virtual ostream& printOn(ostream&) = 0;
  2606. --- 217,222 ----
  2607. *** ./src/domains/sdf/loopScheduler/LSCluster.cc    Wed Nov 25 21:15:12 1992
  2608. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/domains/sdf/loopScheduler/LSCluster.cc    Mon Apr 12 17:53:27 1993
  2609. ***************
  2610. *** 1,7 ****
  2611.   static const char file_id[] = "LSCluster.cc";
  2612.   /******************************************************************
  2613.   Version identification:
  2614. ! @(#)LSCluster.cc    1.9    11/25/92
  2615.   
  2616.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  2617.   All rights reserved.
  2618. --- 1,7 ----
  2619.   static const char file_id[] = "LSCluster.cc";
  2620.   /******************************************************************
  2621.   Version identification:
  2622. ! @(#)LSCluster.cc    1.10    1/18/93
  2623.   
  2624.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  2625.   All rights reserved.
  2626. ***************
  2627. *** 134,140 ****
  2628.       
  2629.   static const int FORCE = 2;
  2630.   // simulate the execution of the cluster
  2631. ! int LSCluster :: simRunStar(int) {
  2632.   
  2633.       SDFFiring* f = firing;
  2634.       while (f) {
  2635. --- 134,140 ----
  2636.       
  2637.   static const int FORCE = 2;
  2638.   // simulate the execution of the cluster
  2639. ! void LSCluster :: simRunRealStars() {
  2640.   
  2641.       SDFFiring* f = firing;
  2642.       while (f) {
  2643. ***************
  2644. *** 143,149 ****
  2645.           }
  2646.           f = f->next;
  2647.       }
  2648. -     return 0;
  2649.   }
  2650.   
  2651.   // indent by depth tabs.
  2652. --- 143,148 ----
  2653. *** ./src/domains/sdf/loopScheduler/LSCluster.h    Wed Nov 25 21:15:11 1992
  2654. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/domains/sdf/loopScheduler/LSCluster.h    Mon Apr 12 17:53:28 1993
  2655. ***************
  2656. *** 1,6 ****
  2657.   /******************************************************************
  2658.   Version identification:
  2659. ! @(#)LSCluster.h    1.10    11/25/92
  2660.   
  2661.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  2662.   All rights reserved.
  2663. --- 1,6 ----
  2664.   /******************************************************************
  2665.   Version identification:
  2666. ! @(#)LSCluster.h    1.11    1/18/93
  2667.   
  2668.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  2669.   All rights reserved.
  2670. ***************
  2671. *** 88,94 ****
  2672.       // simulate execution for schedule generation.  We also
  2673.       // call simRunStar on the "real" star, so info like the
  2674.       // maximum # of tokens on each arc will get set right.
  2675. !     int simRunStar(int deferFiring);
  2676.   
  2677.   private:
  2678.       SDFFiring* firing;    // local schedule
  2679. --- 88,94 ----
  2680.       // simulate execution for schedule generation.  We also
  2681.       // call simRunStar on the "real" star, so info like the
  2682.       // maximum # of tokens on each arc will get set right.
  2683. !     void simRunRealStars();
  2684.   
  2685.   private:
  2686.       SDFFiring* firing;    // local schedule
  2687. *** ./src/domains/sdf/loopScheduler/makefile    Fri Oct 23 13:30:26 1992
  2688. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/domains/sdf/loopScheduler/makefile    Mon Apr 12 17:53:28 1993
  2689. ***************
  2690. *** 90,96 ****
  2691.     DecomGal.h DecomScheduler.h LSGraph.h ../../../../src/domains/sdf/expgraph/ExpandedGraph.h \
  2692.     ../../../../src/domains/sdf/expgraph/EGNode.h ../../../../src/kernel/DoubleLink.h \
  2693.     ../../../../src/domains/sdf/expgraph/EGGate.h ReachabilityMatrix.h LSNode.h \
  2694. !   LSCluster.h ../../../../src/kernel/Target.h ../../../../src/kernel/streamCompat.h 
  2695.   MergeList.o : MergeList.cc MergeList.h ../../../../src/kernel/DoubleLink.h ../../../../src/kernel/type.h \
  2696.     ../../../../src/kernel/logNew.h LSNode.h ../../../../src/domains/sdf/expgraph/EGNode.h \
  2697.     ../../../../src/domains/sdf/kernel/SDFStar.h ../../../../src/kernel/Star.h ../../../../src/kernel/Block.h \
  2698. --- 90,96 ----
  2699.     DecomGal.h DecomScheduler.h LSGraph.h ../../../../src/domains/sdf/expgraph/ExpandedGraph.h \
  2700.     ../../../../src/domains/sdf/expgraph/EGNode.h ../../../../src/kernel/DoubleLink.h \
  2701.     ../../../../src/domains/sdf/expgraph/EGGate.h ReachabilityMatrix.h LSNode.h \
  2702. !   LSCluster.h ../../../../src/kernel/Target.h ../../../../src/kernel/pt_fstream.h 
  2703.   MergeList.o : MergeList.cc MergeList.h ../../../../src/kernel/DoubleLink.h ../../../../src/kernel/type.h \
  2704.     ../../../../src/kernel/logNew.h LSNode.h ../../../../src/domains/sdf/expgraph/EGNode.h \
  2705.     ../../../../src/domains/sdf/kernel/SDFStar.h ../../../../src/kernel/Star.h ../../../../src/kernel/Block.h \
  2706. *** ./src/domains/sdf/stars/SDFPrinter.pl    Tue Dec  8 15:01:59 1992
  2707. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/domains/sdf/stars/SDFPrinter.pl    Mon Apr 12 17:52:10 1993
  2708. ***************
  2709. *** 2,13 ****
  2710.       name { Printer }
  2711.       domain { SDF }
  2712.       desc {
  2713. ! Prints out one sample from each input port per line
  2714. ! If "fileName" is not equal to "<stdout>" (the default), it
  2715. ! specifies the filename to write to.  <stderr> prints on the
  2716. ! standard error stream.
  2717.       }
  2718. !     version {@(#)SDFPrinter.pl    2.11 12/8/92}
  2719.       author { D. G. Messerschmitt and J. Buck }
  2720.       copyright {
  2721.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  2722. --- 2,13 ----
  2723.       name { Printer }
  2724.       domain { SDF }
  2725.       desc {
  2726. ! Prints out one sample from each input port per line.  The "fileName"
  2727. ! state specifies the file to be written; the special names <stdout>
  2728. ! and <cout> (specifying the standard output stream), and <stderr> and <cerr>
  2729. ! specifying the standard error stream, are also supported.
  2730.       }
  2731. !     version {@(#)SDFPrinter.pl    2.12 3/30/93}
  2732.       author { D. G. Messerschmitt and J. Buck }
  2733.       copyright {
  2734.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  2735. ***************
  2736. *** 20,25 ****
  2737. --- 20,29 ----
  2738.   This star prints its input, which may be any supported type.
  2739.   There may be multiple inputs: all inputs are printed together on
  2740.   the same line, separated by tabs.
  2741. + .pp
  2742. + If output is directed to a file, flushing does not occur until the
  2743. + wrapup method is called.  Before the first data are flushed, the file
  2744. + will not even exist.  This is normal.
  2745.       }
  2746.       inmulti {
  2747.           name { input }
  2748. ***************
  2749. *** 33,49 ****
  2750.       }
  2751.       hinclude { "pt_fstream.h" }
  2752.       protected {
  2753. !         pt_ofstream output;
  2754.       }
  2755.       wrapup {
  2756. !         output.close();
  2757.       }
  2758.       setup {
  2759. !         // abortRun is called on open failure
  2760. !         output.open(fileName);
  2761.       }
  2762.       go {
  2763.           MPHIter nexti(input);
  2764.           PortHole* p;
  2765.           while ((p = nexti++) != 0)
  2766. --- 37,57 ----
  2767.       }
  2768.       hinclude { "pt_fstream.h" }
  2769.       protected {
  2770. !         pt_ofstream *p_out;
  2771.       }
  2772. +     constructor { p_out = 0;}
  2773. +     destructor { LOG_DEL; delete p_out;}
  2774.       wrapup {
  2775. !         LOG_DEL; delete p_out;
  2776. !         p_out = 0;
  2777.       }
  2778.       setup {
  2779. !         // in case file was open from previous run w/o wrapup call
  2780. !         LOG_DEL; delete p_out;
  2781. !         LOG_NEW; p_out = new pt_ofstream(fileName);
  2782.       }
  2783.       go {
  2784. +         pt_ofstream& output = *p_out;
  2785.           MPHIter nexti(input);
  2786.           PortHole* p;
  2787.           while ((p = nexti++) != 0)
  2788. *** ./src/domains/de/kernel/DEWormhole.cc    Wed Nov 25 20:54:50 1992
  2789. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/domains/de/kernel/DEWormhole.cc    Mon Apr 12 17:52:38 1993
  2790. ***************
  2791. *** 1,7 ****
  2792.   static const char file_id[] = "DEWormhole.cc";
  2793.   /******************************************************************
  2794.   Version identification:
  2795. !  @(#)DEWormhole.cc    2.14        11/25/92
  2796.   
  2797.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  2798.   All rights reserved.
  2799. --- 1,7 ----
  2800.   static const char file_id[] = "DEWormhole.cc";
  2801.   /******************************************************************
  2802.   Version identification:
  2803. !  @(#)DEWormhole.cc    2.16        3/16/93
  2804.   
  2805.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  2806.   All rights reserved.
  2807. ***************
  2808. *** 88,93 ****
  2809. --- 88,99 ----
  2810.   LOG_NEW; return new DEWormhole(gal.clone()->asGalaxy(), target->cloneTarget());
  2811.   }
  2812.   
  2813. + // makeNew, analogous to clone.
  2814. + Block* DEWormhole :: makeNew() const
  2815. + {
  2816. + LOG_NEW; return new DEWormhole(gal.makeNew()->asGalaxy(), target->cloneTarget());
  2817. + }
  2818.   // sumUp();  If the inner domain is timed and stopBeforeDeadlocked,
  2819.   // put the wormhole into the process queue.
  2820.   void DEWormhole :: sumUp() {
  2821. ***************
  2822. *** 206,214 ****
  2823.               }
  2824.   
  2825.           // send the event
  2826.           for (int k = numberTokens; k > 0; k--) {
  2827.               // 3. get the particle
  2828. !             Particle** p = myBuffer->here();
  2829.               Particle* pp = myPlasma->get();
  2830.               *pp = **p;
  2831.   
  2832. --- 212,221 ----
  2833.               }
  2834.   
  2835.           // send the event
  2836. +         myBuffer->backup(numberTokens);
  2837.           for (int k = numberTokens; k > 0; k--) {
  2838.               // 3. get the particle
  2839. !             Particle** p = myBuffer->next();
  2840.               Particle* pp = myPlasma->get();
  2841.               *pp = **p;
  2842.   
  2843. *** ./src/domains/de/kernel/DEWormhole.h    Wed Nov 25 20:55:23 1992
  2844. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/domains/de/kernel/DEWormhole.h    Mon Apr 12 17:52:38 1993
  2845. ***************
  2846. *** 13,19 ****
  2847.   
  2848.   /*******************************************************************
  2849.    SCCS Version identification :
  2850. !  @(#)DEWormhole.h    2.12        11/25/92
  2851.   
  2852.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  2853.   All rights reserved.
  2854. --- 13,19 ----
  2855.   
  2856.   /*******************************************************************
  2857.    SCCS Version identification :
  2858. !  @(#)DEWormhole.h    2.13        3/16/93
  2859.   
  2860.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  2861.   All rights reserved.
  2862. ***************
  2863. *** 69,80 ****
  2864.       // return my scheduler
  2865.       Scheduler* scheduler() const { return target->scheduler();}
  2866.   
  2867. !     // print methods
  2868. !     StringList printVerbose() const { return Wormhole :: print(0);}
  2869. !     StringList printRecursive() const { return Wormhole :: print(1);}
  2870.   
  2871.       // clone -- allows interpreter to make copies
  2872.       Block* clone() const;
  2873.   
  2874.       // identify myself as a wormhole
  2875.       int isItWormhole() const { return TRUE;}
  2876. --- 69,80 ----
  2877.       // return my scheduler
  2878.       Scheduler* scheduler() const { return target->scheduler();}
  2879.   
  2880. !     // print method
  2881. !     StringList print(int verbose) const { return Wormhole::print(verbose);}
  2882.   
  2883.       // clone -- allows interpreter to make copies
  2884.       Block* clone() const;
  2885. +     Block* makeNew() const;
  2886.   
  2887.       // identify myself as a wormhole
  2888.       int isItWormhole() const { return TRUE;}
  2889. *** ./src/domains/de/stars/DEPrinter.pl    Tue Dec  8 15:01:03 1992
  2890. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/domains/de/stars/DEPrinter.pl    Mon Apr 12 17:52:53 1993
  2891. ***************
  2892. *** 2,14 ****
  2893.       name { Printer }
  2894.       domain { DE }
  2895.       desc {
  2896. ! Prints out one sample from each input port per line
  2897. ! If "fileName" is not equal to "<stdout>" (the default), it
  2898. ! specifies the filename to write to.  <stderr> prints on the
  2899. ! standard error stream.
  2900.       }
  2901. !     version { @(#)DEPrinter.pl    2.9    12/8/92}
  2902. !     author { Soonhoi Ha }
  2903.       copyright {
  2904.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  2905.   All rights reserved.
  2906. --- 2,14 ----
  2907.       name { Printer }
  2908.       domain { DE }
  2909.       desc {
  2910. ! Prints out one sample from each input port per line.  The "fileName"
  2911. ! state specifies the file to be written; the special names <stdout>
  2912. ! and <cout> (specifying the standard output stream), and <stderr> and <cerr>
  2913. ! specifying the standard error stream, are also supported.
  2914.       }
  2915. !     version { @(#)DEPrinter.pl    2.10    3/30/93}
  2916. !     author { Soonhoi Ha and J. Buck}
  2917.       copyright {
  2918.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  2919.   All rights reserved.
  2920. ***************
  2921. *** 19,24 ****
  2922. --- 19,28 ----
  2923.       explanation {
  2924.   The input may be a particle of any type.  The print() method
  2925.   of the particle is used to generate the output.
  2926. + .pp
  2927. + If output is directed to a file, flushing does not occur until the
  2928. + wrapup method is called.  Before the first data are flushed, the file
  2929. + will not even exist.  This is normal.
  2930.       }
  2931.       inmulti {
  2932.           name { input }
  2933. ***************
  2934. *** 32,45 ****
  2935.       }
  2936.       hinclude { "pt_fstream.h" }
  2937.       protected {
  2938. !         pt_ofstream output;
  2939.       }
  2940.       setup {
  2941. !         // abortRun is called on open failure
  2942. !         output.open(fileName);
  2943.       }
  2944.       go {
  2945.           // detect which input has an event and print out the
  2946.           // value and arrivalTime.
  2947.           InDEMPHIter nextp(input);
  2948. --- 36,52 ----
  2949.       }
  2950.       hinclude { "pt_fstream.h" }
  2951.       protected {
  2952. !         pt_ofstream *p_out;
  2953.       }
  2954. +     constructor { p_out = 0;}
  2955. +     destructor { LOG_DEL; delete p_out;}
  2956.       setup {
  2957. !         // in case file was open from previous run w/o wrapup call
  2958. !         LOG_DEL; delete p_out;
  2959. !         LOG_NEW; p_out = new pt_ofstream(fileName);
  2960.       }
  2961.       go {
  2962. +         pt_ofstream& output = *p_out;
  2963.           // detect which input has an event and print out the
  2964.           // value and arrivalTime.
  2965.           InDEMPHIter nextp(input);
  2966. ***************
  2967. *** 54,60 ****
  2968.           }
  2969.       }
  2970.       wrapup {
  2971. !         output.close();
  2972.       }
  2973.   }
  2974.   
  2975. --- 61,68 ----
  2976.           }
  2977.       }
  2978.       wrapup {
  2979. !         LOG_DEL; delete p_out;
  2980. !         p_out = 0;
  2981.       }
  2982.   }
  2983.   
  2984. *** ./src/domains/ddf/kernel/DDFWormhole.h    Wed Nov 25 21:02:15 1992
  2985. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/domains/ddf/kernel/DDFWormhole.h    Mon Apr 12 17:16:38 1993
  2986. ***************
  2987. *** 11,17 ****
  2988.   
  2989.   /*******************************************************************
  2990.    SCCS Version identification :
  2991. !  @(#)DDFWormhole.h    2.11    11/25/92
  2992.   
  2993.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  2994.   All rights reserved.
  2995. --- 11,17 ----
  2996.   
  2997.   /*******************************************************************
  2998.    SCCS Version identification :
  2999. !  @(#)DDFWormhole.h    2.12    3/16/93
  3000.   
  3001.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  3002.   All rights reserved.
  3003. ***************
  3004. *** 62,73 ****
  3005.   
  3006.       Scheduler* scheduler() const { return target->scheduler();}
  3007.   
  3008. !     // print methods
  3009. !     StringList printVerbose() const { return Wormhole :: print(0);}
  3010. !     StringList printRecursive() const { return Wormhole :: print(1);}
  3011.   
  3012.       // clone -- allows interpreter to make copies
  3013.       Block* clone() const;
  3014.   
  3015.       // identify myself as a wormhole
  3016.       int isItWormhole() const { return TRUE;}
  3017. --- 62,73 ----
  3018.   
  3019.       Scheduler* scheduler() const { return target->scheduler();}
  3020.   
  3021. !     // print method
  3022. !     StringList print(int verbose) const { return Wormhole::print(verbose);}
  3023.   
  3024.       // clone -- allows interpreter to make copies
  3025.       Block* clone() const;
  3026. +     Block* makeNew() const;
  3027.   
  3028.       // identify myself as a wormhole
  3029.       int isItWormhole() const { return TRUE;}
  3030. *** ./src/domains/ddf/kernel/DDFWormhole.cc    Wed Nov 25 21:01:42 1992
  3031. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/domains/ddf/kernel/DDFWormhole.cc    Mon Apr 12 17:20:51 1993
  3032. ***************
  3033. *** 1,7 ****
  3034.   static const char file_id[] = "DDFWormhole.cc";
  3035.   /******************************************************************
  3036.   Version identification:
  3037. !  @(#)DDFWormhole.cc    2.10    11/25/92
  3038.   
  3039.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  3040.   All rights reserved.
  3041. --- 1,7 ----
  3042.   static const char file_id[] = "DDFWormhole.cc";
  3043.   /******************************************************************
  3044.   Version identification:
  3045. !  @(#)DDFWormhole.cc    2.11    3/16/93
  3046.   
  3047.   Copyright (c) 1990, 1991, 1992 The Regents of the University of California.
  3048.   All rights reserved.
  3049. ***************
  3050. *** 78,83 ****
  3051. --- 78,90 ----
  3052.   Block* DDFWormhole :: clone() const
  3053.   {
  3054.   LOG_NEW; return new DDFWormhole(gal.clone()->asGalaxy(), target->cloneTarget());
  3055. + }
  3056. + // makeNew, analogous to clone.
  3057. + Block* DDFWormhole :: makeNew() const
  3058. + {
  3059. + LOG_NEW; return new DDFWormhole(gal.makeNew()->asGalaxy(),
  3060. +                 target->cloneTarget());
  3061.   }
  3062.   
  3063.   /**************************************************************************
  3064. *** ./src/domains/thor/kernel/ThorWormhole.cc    Wed Nov 25 20:52:35 1992
  3065. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/domains/thor/kernel/ThorWormhole.cc    Mon Apr 12 17:54:08 1993
  3066. ***************
  3067. *** 28,34 ****
  3068.   ///////////////////////////////////////////////////////////////////////////
  3069.   //
  3070.   // Version identification:
  3071. ! // @(#)ThorWormhole.cc    1.13 11/25/92
  3072.   //
  3073.   // Copyright  (c) 1990    The Regents of the University of California,
  3074.   //                All Rights Reserved.
  3075. --- 28,34 ----
  3076.   ///////////////////////////////////////////////////////////////////////////
  3077.   //
  3078.   // Version identification:
  3079. ! // @(#)ThorWormhole.cc    1.14 3/16/93
  3080.   //
  3081.   // Copyright  (c) 1990    The Regents of the University of California,
  3082.   //                All Rights Reserved.
  3083. ***************
  3084. *** 74,79 ****
  3085. --- 74,86 ----
  3086.   Block* ThorWormhole :: clone() const
  3087.   {
  3088.       LOG_NEW; return new ThorWormhole(gal.clone()->asGalaxy());
  3089. + }
  3090. + // makeNew, analogous to clone.
  3091. + Block* ThorWormhole :: makeNew() const
  3092. + {
  3093. + LOG_NEW; return new ThorWormhole(gal.makeNew()->asGalaxy(),
  3094. +                 target->cloneTarget());
  3095.   }
  3096.   
  3097.   // sumUp();  If the inner domain is timed and stopBeforeDeadlocked,
  3098. *** ./src/domains/thor/kernel/ThorWormhole.h    Wed Nov 25 20:53:57 1992
  3099. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/domains/thor/kernel/ThorWormhole.h    Mon Apr 12 17:54:09 1993
  3100. ***************
  3101. *** 33,39 ****
  3102.   ///////////////////////////////////////////////////////////////////////////
  3103.   //
  3104.   // Version identification:
  3105. ! // @(#)ThorWormhole.h    1.11 11/25/92
  3106.   //
  3107.   // Copyright  (c) 1990    The Regents of the University of California,
  3108.   //                All Rights Reserved.
  3109. --- 33,39 ----
  3110.   ///////////////////////////////////////////////////////////////////////////
  3111.   //
  3112.   // Version identification:
  3113. ! // @(#)ThorWormhole.h    1.12 3/16/93
  3114.   //
  3115.   // Copyright  (c) 1990    The Regents of the University of California,
  3116.   //                All Rights Reserved.
  3117. ***************
  3118. *** 77,88 ****
  3119.        // destructor
  3120.        ~ThorWormhole() { freeContents();}
  3121.   
  3122. !      // print methods
  3123. !      StringList printVerbose() const { return Wormhole :: print(0); }
  3124. !      StringList printRecursive() const { return Wormhole :: print(1); }
  3125.   
  3126.        // clone -- allows interpreter to make copies
  3127.        Block* clone() const;
  3128.   
  3129.        // return my scheduler
  3130.        Scheduler* scheduler() const { return target->scheduler();}
  3131. --- 77,88 ----
  3132.        // destructor
  3133.        ~ThorWormhole() { freeContents();}
  3134.   
  3135. !      // print method
  3136. !      StringList print(int verbose) const { return Wormhole::print(verbose);}
  3137.   
  3138.        // clone -- allows interpreter to make copies
  3139.        Block* clone() const;
  3140. +      Block* makeNew() const;
  3141.   
  3142.        // return my scheduler
  3143.        Scheduler* scheduler() const { return target->scheduler();}
  3144. *** ./src/domains/thor/pepp/make.template    Wed Oct 28 21:49:16 1992
  3145. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/domains/thor/pepp/make.template    Wed Apr 14 13:45:30 1993
  3146. ***************
  3147. *** 1,6 ****
  3148.   # Makefile for Thor preprocessor (pepp)
  3149.   # Version identification:
  3150. ! # @(#)make.template    1.18    10/28/92
  3151.   # Copyright (c) 1990 The Regents of the University of California.
  3152.   #                       All Rights Reserved.
  3153.   # Date of creation: 2/11/91
  3154. --- 1,6 ----
  3155.   # Makefile for Thor preprocessor (pepp)
  3156.   # Version identification:
  3157. ! # @(#)make.template    1.19    4/14/93
  3158.   # Copyright (c) 1990 The Regents of the University of California.
  3159.   #                       All Rights Reserved.
  3160.   # Date of creation: 2/11/91
  3161. ***************
  3162. *** 43,53 ****
  3163.   
  3164.   HDRS=        comdefs.h cc-strings.h pass1Syn.h
  3165.   
  3166. ! OBJS =    pass1Syn.o pass1Lex.o pass2Lex.o utils.o codefncs.o \
  3167.           cc-strings.o errmsg.o dbgmsg.o main.o
  3168.   
  3169.   EXTRA_DESTS=    comp.c comp.o pepp
  3170.   
  3171.   all:        makefile $(PROGRAM)
  3172.   
  3173.   $(PROGRAM):    $(OBJS)
  3174. --- 43,55 ----
  3175.   
  3176.   HDRS=        comdefs.h cc-strings.h pass1Syn.h
  3177.   
  3178. ! OBJS =        pass1Syn.o pass1Lex.o pass2Lex.o utils.o codefncs.o \
  3179.           cc-strings.o errmsg.o dbgmsg.o main.o
  3180.   
  3181.   EXTRA_DESTS=    comp.c comp.o pepp
  3182.   
  3183. + C_INCL =    -I$(VPATH)
  3184.   all:        makefile $(PROGRAM)
  3185.   
  3186.   $(PROGRAM):    $(OBJS)
  3187. ***************
  3188. *** 85,92 ****
  3189.   install:    makefile $(BINDIR)/$(PROGRAM)
  3190.   
  3191.   $(BINDIR)/$(PROGRAM):    $(PROGRAM)
  3192. !         @echo "Installing $(PROGRAM) in directory $(BINDIR) ...";\
  3193. !          rm -f $(BINDIR)/$(PROGRAM);\
  3194.            ln $(PROGRAM) $(BINDIR)
  3195.   
  3196.   include $(ROOT)/common.mk
  3197. --- 87,93 ----
  3198.   install:    makefile $(BINDIR)/$(PROGRAM)
  3199.   
  3200.   $(BINDIR)/$(PROGRAM):    $(PROGRAM)
  3201. !          rm -f $(BINDIR)/$(PROGRAM)
  3202.            ln $(PROGRAM) $(BINDIR)
  3203.   
  3204.   include $(ROOT)/common.mk
  3205. ***************
  3206. *** 93,97 ****
  3207.   
  3208.   # Don't add anything after the next lin; makedepend will zap it.
  3209.   # DO NOT DELETE THIS LINE -- make depend depends on it.
  3210. --- 94,96 ----
  3211. *** ./src/domains/cg56/stars/CG56Sin.pl    Tue Dec  8 15:06:42 1992
  3212. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/domains/cg56/stars/CG56Sin.pl    Wed Apr 14 13:47:18 1993
  3213. ***************
  3214. *** 6,12 ****
  3215.   Calculation by table lookup.  Input range of (-1,1) scaled by pi.
  3216.   Output is sin(pi*input).
  3217.       }
  3218. !     version { @(#)CG56Sin.pl    1.10 12/8/92 }
  3219.       acknowledge { Gabriel version by Maureen O'Reilly }
  3220.       author { Kennard, Chih-Tsung Huang (ported from Gabriel) }
  3221.       copyright {
  3222. --- 6,12 ----
  3223.   Calculation by table lookup.  Input range of (-1,1) scaled by pi.
  3224.   Output is sin(pi*input).
  3225.       }
  3226. !     version { @(#)CG56Sin.pl    1.11 1/19/93 }
  3227.       acknowledge { Gabriel version by Maureen O'Reilly }
  3228.       author { Kennard, Chih-Tsung Huang (ported from Gabriel) }
  3229.       copyright {
  3230. ***************
  3231. *** 75,80 ****
  3232. --- 75,88 ----
  3233.           move    y:(r1),b    ; read the table
  3234.           move    b1,$ref(output)
  3235.       }
  3236. +     code {
  3237. +         // fn to round to nearest int.  Done this way because
  3238. +         // truncation of negative values to integers is machine
  3239. +         // dependent in C/C++.
  3240. +         inline int round(double x) {
  3241. +             return (x >= 0) ? int(x+0.5) : -int(0.5-x);
  3242. +         }
  3243. +     }
  3244.       setup {
  3245.           double ph = double(phase);
  3246.           if ( ph < 0 ) {
  3247. ***************
  3248. *** 84,90 ****
  3249.               int n = (int) floor(ph / 360.0);
  3250.               ph -= 360.0 * n;
  3251.           }
  3252. !         phaseOffset = (int) rint(ph/360.0*256.0);
  3253.       }
  3254.       go {
  3255.           addCode(cbPrepare);
  3256. --- 92,98 ----
  3257.               int n = (int) floor(ph / 360.0);
  3258.               ph -= 360.0 * n;
  3259.           }
  3260. !         phaseOffset = round(ph/360.0*256.0);
  3261.       }
  3262.       go {
  3263.           addCode(cbPrepare);
  3264. *** ./src/xgraph/hpgl.c    Wed Apr  8 16:06:17 1992
  3265. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/xgraph/hpgl.c    Wed Apr 14 15:41:03 1993
  3266. ***************
  3267. *** 1,3 ****
  3268. --- 1,4 ----
  3269. + /* Ptolemy version: @(#)hpgl.c    1.2 4/14/93 */
  3270.   /*
  3271.    * HPGL Output
  3272.    *
  3273. ***************
  3274. *** 8,16 ****
  3275.   #define MAPY(state,y) ( MAXY - (y) + P1Y - state->clipminY)
  3276.   
  3277.   #include "copyright.h"
  3278.   #include "xgout.h"
  3279.   #include "plotter.h"
  3280. - #include <stdio.h>
  3281.   #include <math.h>
  3282.   #define MAX(a,b) ( ((a)>(b)) ? (a) : (b) )
  3283.   #define MIN(a,b) ( ((a)<(b)) ? (a) : (b) )
  3284. --- 9,17 ----
  3285.   #define MAPY(state,y) ( MAXY - (y) + P1Y - state->clipminY)
  3286.   
  3287.   #include "copyright.h"
  3288. + #include <stdio.h>
  3289.   #include "xgout.h"
  3290.   #include "plotter.h"
  3291.   #include <math.h>
  3292.   #define MAX(a,b) ( ((a)>(b)) ? (a) : (b) )
  3293.   #define MIN(a,b) ( ((a)<(b)) ? (a) : (b) )
  3294. *** ./src/xgraph/hard_devices.h    Wed Apr  8 16:06:21 1992
  3295. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/xgraph/hard_devices.h    Wed Apr 14 16:10:27 1993
  3296. ***************
  3297. *** 21,27 ****
  3298.       char dev_axis_font[MFNAME];    /* Default name of axis font         */
  3299.       double dev_axis_size;    /* Default size of axis font (pnts)  */
  3300.       hard_dev_docu dev_docu;    /* Document predicate                */
  3301. ! };
  3302.   
  3303.   extern int hard_count;
  3304.   extern struct hard_dev hard_devices[];
  3305. --- 21,27 ----
  3306.       char dev_axis_font[MFNAME];    /* Default name of axis font         */
  3307.       double dev_axis_size;    /* Default size of axis font (pnts)  */
  3308.       hard_dev_docu dev_docu;    /* Document predicate                */
  3309. ! } hard_dev;
  3310.   
  3311.   extern int hard_count;
  3312.   extern struct hard_dev hard_devices[];
  3313. *** ./src/xgraph/make.template    Thu Oct  1 14:41:36 1992
  3314. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/src/xgraph/make.template    Wed Apr 14 15:41:03 1993
  3315. ***************
  3316. *** 1,6 ****
  3317.   # Ptolemy-style makefile for xgraph
  3318.   # Version identification:
  3319. ! # @(#)make.template    1.3    10/1/92
  3320.   # Copyright (c) 1991 The Regents of the University of California.
  3321.   #                       All Rights Reserved.
  3322.   
  3323. --- 1,6 ----
  3324.   # Ptolemy-style makefile for xgraph
  3325.   # Version identification:
  3326. ! # @(#)make.template    1.4    4/14/93
  3327.   # Copyright (c) 1991 The Regents of the University of California.
  3328.   #                       All Rights Reserved.
  3329.   
  3330. ***************
  3331. *** 23,29 ****
  3332.   
  3333.   xgraph:    $(OBJS)
  3334.       rm -f xgraph
  3335. !     cc $(X11LIBDIR) -o xgraph $(OBJS) $(LXEXT) $(LX11) -lm
  3336.   
  3337.   OUT = $(BINDIR)/xgraph
  3338.   
  3339. --- 23,29 ----
  3340.   
  3341.   xgraph:    $(OBJS)
  3342.       rm -f xgraph
  3343. !     $(CC) $(X11LIBDIR) -o xgraph $(OBJS) $(LXEXT) $(LX11) -lm
  3344.   
  3345.   OUT = $(BINDIR)/xgraph
  3346.   
  3347. *** ./lib/pigiRpcShell    Fri Dec 11 14:13:10 1992
  3348. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/lib/pigiRpcShell    Wed Apr 21 10:54:05 1993
  3349. ***************
  3350. *** 1,6 ****
  3351.   #! /bin/sh
  3352.   # usage: pigiRpcShell <vem-rpc-args>
  3353. ! # Version: @(#)pigiRpcShell    1.3 12/11/92
  3354.   # Copyright (c) 1990,1991,1992 The Regents of the University of California.
  3355.   # All Rights Reserved.
  3356.   #
  3357. --- 1,6 ----
  3358.   #! /bin/sh
  3359.   # usage: pigiRpcShell <vem-rpc-args>
  3360. ! # Version: @(#)pigiRpcShell    1.4    1/19/93
  3361.   # Copyright (c) 1990,1991,1992 The Regents of the University of California.
  3362.   # All Rights Reserved.
  3363.   #
  3364. ***************
  3365. *** 17,22 ****
  3366. --- 17,24 ----
  3367.   #
  3368.   # check if we have an environment-passing file
  3369.   #
  3370. + # SysV uses LOGNAME instead of USER
  3371. + USER=${USER-$LOGNAME}
  3372.   cmdfile=/tmp/pigiCmds.$USER
  3373.   if [ -r $cmdfile ] ; then
  3374.       . $cmdfile
  3375. ***************
  3376. *** 24,34 ****
  3377.   libdir=`dirname $0`
  3378.   PTOLEMY=${PTOLEMY-`dirname $libdir`}
  3379.   HOME=${HOME-.}
  3380. ! ARCH=${ARCH-`(/bin/arch || /bin/machine) 2> /dev/null`}
  3381.   PIGIRPC=${PIGIRPC-$PTOLEMY/bin.$ARCH/pigiRpc}
  3382.   COMMAND=${COMMAND-$PIGIRPC}
  3383.   DISPLAY=${DISPLAY-'unix:0'}
  3384.   TAILARGS=${TAILARGS-''}
  3385.   export PTOLEMY HOME ARCH PIGIRPC DISPLAY
  3386. ! chdir $HOME
  3387.   exec $COMMAND $* $TAILARGS
  3388. --- 26,36 ----
  3389.   libdir=`dirname $0`
  3390.   PTOLEMY=${PTOLEMY-`dirname $libdir`}
  3391.   HOME=${HOME-.}
  3392. ! ARCH=${ARCH-`(/bin/arch || /bin/machine || $PTOLEMY/bin/arch ) 2> /dev/null`}
  3393.   PIGIRPC=${PIGIRPC-$PTOLEMY/bin.$ARCH/pigiRpc}
  3394.   COMMAND=${COMMAND-$PIGIRPC}
  3395.   DISPLAY=${DISPLAY-'unix:0'}
  3396.   TAILARGS=${TAILARGS-''}
  3397.   export PTOLEMY HOME ARCH PIGIRPC DISPLAY
  3398. ! cd $HOME
  3399.   exec $COMMAND $* $TAILARGS
  3400. *** ./bin/pigi    Fri Dec 11 22:27:26 1992
  3401. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/bin/pigi    Thu Apr 15 14:46:59 1993
  3402. ***************
  3403. *** 6,12 ****
  3404.   # 
  3405.   # This is a modified version to support a PTOLEMY environment variable.
  3406.   #
  3407. ! # Version: @(#)pigiEnv.csh    1.4 12/11/92
  3408.   # Copyright (c) 1990,1991,1992 The Regents of the University of California.
  3409.   #     All Rights Reserved.
  3410.   #
  3411. --- 6,12 ----
  3412.   # 
  3413.   # This is a modified version to support a PTOLEMY environment variable.
  3414.   #
  3415. ! # Version: @(#)pigiEnv.csh    1.5    1/19/93
  3416.   # Copyright (c) 1990,1991,1992 The Regents of the University of California.
  3417.   #     All Rights Reserved.
  3418.   #
  3419. ***************
  3420. *** 16,27 ****
  3421.       exit 1
  3422.   endif
  3423.   
  3424. ! if ( ! $?PTOLEMY ) setenv PTOLEMY ~ptolemy
  3425.   if ( ! $?ARCH ) then
  3426.       setenv ARCH `$PTOLEMY/bin/arch`
  3427.   endif
  3428.   
  3429. ! if ( ! $?PIGIRPC ) setenv PIGIRPC $PTOLEMY/bin.$ARCH/pigiRpc
  3430.   
  3431.   if ( "$1" == "-debug" ) then
  3432.       shift
  3433. --- 16,37 ----
  3434.       exit 1
  3435.   endif
  3436.   
  3437. ! if ( ! $?PTOLEMY ) then 
  3438. !     setenv PTOLEMY ~ptolemy
  3439. ! endif
  3440. ! if ( ! $?OCTTOOLS ) then
  3441. !     setenv OCTTOOLS $PTOLEMY
  3442. ! endif
  3443. ! if ( ! $?USER ) then 
  3444. !     setenv USER $LOGNAME
  3445. ! endif
  3446.   if ( ! $?ARCH ) then
  3447.       setenv ARCH `$PTOLEMY/bin/arch`
  3448.   endif
  3449.   
  3450. ! if ( ! $?PIGIRPC ) then
  3451. !     setenv PIGIRPC $PTOLEMY/bin.$ARCH/pigiRpc
  3452. ! endif
  3453.   
  3454.   if ( "$1" == "-debug" ) then
  3455.       shift
  3456. *** ./bin/pigiEnv.csh    Fri Dec 11 22:27:26 1992
  3457. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/bin/pigiEnv.csh    Mon Apr 12 17:54:27 1993
  3458. ***************
  3459. *** 6,12 ****
  3460.   # 
  3461.   # This is a modified version to support a PTOLEMY environment variable.
  3462.   #
  3463. ! # Version: @(#)pigiEnv.csh    1.4 12/11/92
  3464.   # Copyright (c) 1990,1991,1992 The Regents of the University of California.
  3465.   #     All Rights Reserved.
  3466.   #
  3467. --- 6,12 ----
  3468.   # 
  3469.   # This is a modified version to support a PTOLEMY environment variable.
  3470.   #
  3471. ! # Version: @(#)pigiEnv.csh    1.5    1/19/93
  3472.   # Copyright (c) 1990,1991,1992 The Regents of the University of California.
  3473.   #     All Rights Reserved.
  3474.   #
  3475. ***************
  3476. *** 17,22 ****
  3477. --- 17,24 ----
  3478.   endif
  3479.   
  3480.   if ( ! $?PTOLEMY ) setenv PTOLEMY ~ptolemy
  3481. + if ( ! $?OCTTOOLS ) setenv OCTTOOLS $PTOLEMY
  3482. + if ( ! $?USER ) setenv USER $LOGNAME
  3483.   if ( ! $?ARCH ) then
  3484.       setenv ARCH `$PTOLEMY/bin/arch`
  3485.   endif
  3486. *** ./bin/prfacet    Tue Dec  1 09:54:30 1992
  3487. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/bin/prfacet    Mon Apr 12 17:54:28 1993
  3488. ***************
  3489. *** 1,15 ****
  3490.   #!/bin/csh -f
  3491.   # prfacet
  3492. ! # @(#)prfacet    1.5    12/1/92
  3493.   #
  3494. ! # Print a facet using oct2ps to the printer specified by the environment
  3495. ! # variable PRINTER.
  3496.   #
  3497.   
  3498. - if ( ! $?PTOLEMY ) setenv PTOLEMY ~ptolemy
  3499.   
  3500.   set path = ( $PTOLEMY/octtools/bin.$ARCH $path )
  3501. ! if (!($?OCTTOOLS)) then
  3502. !     setenv OCTTOOLS $PTOLEMY
  3503. ! endif
  3504. ! oct2ps -=T $PTOLEMY/lib/bw_patterns -f interface $*\:schematic | lpr -P$PRINTER
  3505. --- 1,48 ----
  3506.   #!/bin/csh -f
  3507.   # prfacet
  3508. ! # SCCS info: %W% %G%
  3509.   #
  3510. ! # Using oct2ps, send a PostScript view of a facet to a printer or file.
  3511.   #
  3512. + # usage: prfacet [-TOFILE file] [oct2ps options] facet-name
  3513. + #
  3514. + #    Generate a PostScript view of the specified facet.
  3515. + #    If the first argument to prfacet is "-TOFILE", the PostScript
  3516. + #    is saved to the specified file.    If "-TOFILE" is not the first
  3517. + #    argument to prfacet, the PostScript is sent directly to the
  3518. + #    printer. The printer name must be specified    by the environment
  3519. + #    variable PRINTER.
  3520. + #
  3521. + #    The last option must be the pathname of the facet to be printed.
  3522. + #    All other options are passed to "oct2ps".
  3523.   
  3524.   
  3525. + ##
  3526. + ## Set shell and environment variables.
  3527. + ##
  3528. + if (!($?PTOLEMY)) setenv PTOLEMY ~ptolemy
  3529. + if (!($?OCTTOOLS)) setenv OCTTOOLS $PTOLEMY
  3530.   set path = ( $PTOLEMY/octtools/bin.$ARCH $path )
  3531. ! set fixedArgs = ( -=T $PTOLEMY/lib/bw_patterns -f interface )
  3532. ! ##
  3533. ! ## Need two separate "if" lines below because we can't
  3534. ! ## check $argv[1] whenever $#argv == 0.
  3535. ! ##
  3536. ! ## Need `expr` below because the simpler expression
  3537. ! ##        if ($argv[1] != "-TOFILE)
  3538. ! ## fails whenever $argv[1] is "-x", "-f", etc.
  3539. ! ##
  3540. ! if ($#argv == 0) goto ToPrint
  3541. ! if (`expr $argv[1] != "-TOFILE"`) goto ToPrint
  3542. ! goto ToFile
  3543. ! ToFile:
  3544. !     oct2ps $fixedArgs $argv[3-]\:schematic > $argv[2]
  3545. !     exit
  3546. ! ToPrint:
  3547. !     oct2ps $fixedArgs $argv[*]\:schematic | lpr -P$PRINTER
  3548. !     exit
  3549. *** ./bin/ptman    Fri Dec 11 11:40:52 1992
  3550. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/bin/ptman    Mon Apr 12 17:54:28 1993
  3551. ***************
  3552. *** 1,6 ****
  3553.   #!/bin/csh -f
  3554.   
  3555. ! # @(#)ptman    1.6    12/11/92
  3556.   
  3557.   # Print a man page for a Ptolemy star.  Star can have its domain prepended to
  3558.   # it (e.g., SDFLMS) or not (e.g., LMS).  Looks through all the domains in
  3559. --- 1,6 ----
  3560.   #!/bin/csh -f
  3561.   
  3562. ! # @(#)ptman    1.7    2/8/93
  3563.   
  3564.   # Print a man page for a Ptolemy star.  Star can have its domain prepended to
  3565.   # it (e.g., SDFLMS) or not (e.g., LMS).  Looks through all the domains in
  3566. ***************
  3567. *** 66,72 ****
  3568.   # Find the star
  3569.   cd $domaindir
  3570.   if ($?PTMANPATH) then
  3571. !     set domains = $PTMANPATH
  3572.   else
  3573.       set domains = `ls`
  3574.   endif
  3575. --- 66,72 ----
  3576.   # Find the star
  3577.   cd $domaindir
  3578.   if ($?PTMANPATH) then
  3579. !     set domains = ($PTMANPATH)
  3580.   else
  3581.       set domains = `ls`
  3582.   endif
  3583. *** ./bin/arch    Thu Oct 15 11:22:09 1992
  3584. --- /imports/ptolemy/pt1/ptolemy/PTOLEMY_0.4.1/ptolemy/bin/arch    Wed Apr 14 13:42:38 1993
  3585. ***************
  3586. *** 1,5 ****
  3587.   #! /bin/sh
  3588. ! # @(#)arch    1.2    10/15/92
  3589.   # shell script to figure out architecture, using C preprocessor
  3590.   # works on the architectures we support.
  3591.   /lib/cpp << EOF | grep '^X' | sed s/X//
  3592. --- 1,5 ----
  3593.   #! /bin/sh
  3594. ! # @(#)arch    1.3    4/14/93
  3595.   # shell script to figure out architecture, using C preprocessor
  3596.   # works on the architectures we support.
  3597.   /lib/cpp << EOF | grep '^X' | sed s/X//
  3598. ***************
  3599. *** 17,22 ****
  3600.   Xmips
  3601.   #endif
  3602.   #ifdef hppa
  3603. ! Xsnake
  3604.   #endif
  3605.   EOF
  3606. --- 17,22 ----
  3607.   Xmips
  3608.   #endif
  3609.   #ifdef hppa
  3610. ! Xhppa
  3611.   #endif
  3612.   EOF
  3613.